home *** CD-ROM | disk | FTP | other *** search
/ LSD Docs / LSD Docs.iso / FILEZ / lsdspr06.dms / lsdspr06.adf / UltraCard.doc.pp / UltraCard.doc
Text File  |  1990-09-07  |  105KB  |  4,066 lines

  1.                               UltraCard
  2.  
  3.                           Table of Contents
  4.  
  5. Introduction........................................................... 1
  6. What is UltraCard?..................................................... 1
  7. What Can UltraCard do?................................................. 2
  8. When should I choose UltraCard?........................................ 4
  9. Summary of UltraCard Specifications?................................... 5
  10. Getting Started........................................................ 7
  11. Copying your distribution disk......................................... 7
  12. Configuring UltraCard on Floppy Disks.................................. 8
  13. Configuring UltraCard on Hard Disks.................................... 8
  14. Loading UltraCard..................................................... 10
  15. Leaving UltraCard..................................................... 11
  16. The ControlRoom Stack................................................. 12
  17. The Starting point and the Return..................................... 12
  18. Loading Other Stacks.................................................. 14
  19. Setting the Pathways.................................................. 14
  20. More.................................................................. 15
  21. UltraCard Operating Basics............................................ 15
  22. Browsing.............................................................. 18
  23. Selecting Objects with the mouse...................................... 18
  24. Changing Frames....................................................... 19
  25. Using the GO Menu..................................................... 19
  26. Using the Arrow Keys.................................................. 20
  27. Going BACK............................................................ 20
  28. Using the Recent Frame Selector....................................... 21
  29. Accessing the Intuitive technologies BBS.............................. 22
  30. Distribution of the Browser........................................... 23
  31. UltraCard Language Specification...................................... 24
  32. Introduction.......................................................... 24
  33. General Syntax Rules.................................................. 24
  34. Data Values........................................................... 25
  35. Objects, Frames, Backdrops & Stacks................................... 25
  36. Messages.............................................................. 28
  37. Message Hierarchy..................................................... 29
  38. Message Transformation................................................ 30
  39. Message Handlers...................................................... 31
  40. Variables -- Local & Global........................................... 32
  41.  
  42.                 i
  43.  
  44. Statement Handlers.................................................... 33
  45. Function Handlers..................................................... 34
  46. Ultra Talk Expressions................................................ 35
  47. OPERATORS............................................................. 35
  48. UltraCard Statements.................................................. 37
  49. UltraCard Functions.................................................. 116
  50. UltraCard Global Variables........................................... 144
  51. UltraCard Object Properties.......................................... 156
  52. UltraCard Messages................................................... 162
  53. Creating A New Stack................................................. 166
  54. UltraCard Menu Reference............................................. 168
  55. Index................................................................ 183
  56.  
  57.                 ii
  58.  
  59.                            Introduction
  60.  
  61. Thank you for purchasing a license for UltraCard.  We at Intuitive
  62. Technologies are proud to bring you this innovative software for your
  63. Amiga.
  64.  
  65. UltraCard frees your creativity and allows you to create, for the first
  66. time, quality applications for your Amiga without devoting your life to the
  67. study of the Amiga's internal software.
  68.  
  69. We know that you will find UltraCard an enjoyable and exciting product and
  70. hope that it will bring you hours of productive and creative pleasure.
  71.  
  72.                          What Is UltraCard?
  73.  
  74. UltraCard is, technically speaking, a multi-tasking hypermedia information
  75. construction set.
  76.  
  77. UltraCard allows you to build a collection of information which is called a
  78. STACK.  In the stack are elements called FRAMES that contain information. 
  79. The information contained in a frame may be graphic, audio, and textural. 
  80. The graphic information can be
  81.  
  82.                 1
  83.  
  84. constructed of drawing objects and bitmaps.  The textural information can
  85. be single line, multi-line and include hypertext links which allows action
  86. to be taken based upon the contents of the textural data.
  87.  
  88. Using these stacks of frames you can construct information.  The
  89. information can be static, such as a multi-level map of the United States
  90. or active such as a name and address database, a top 10 music sampler or
  91. even a user interface for sophisticated hardware.  Almost anything that the
  92. Amiga can do, you can do with UltraCard, without years of study!
  93.  
  94. While the previous paragraphs describe what UltraCard is they still don't
  95. tell you what you can do with UltraCard.
  96.  
  97.                    What can UltraCard do?
  98.  
  99. UltraCard can be used to create many things from databases, sophisticated
  100. multi-media information retrieval systems, to educational material and
  101. personal information systems such as appointment calendars and project
  102. management outliners.
  103.  
  104. Some of the things we have constructed from UltraCard are:
  105.  
  106. 1. A Names & Addresses stack for the UltraCard users.
  107.  
  108.                 2
  109.  
  110. 2. Multiple choice quizes with scoring for students.
  111.  
  112. 3. The UltraCard Manual, Tutorial and Help stacks.
  113.  
  114. 4. A Help stack for the MaxiPlan-III spreadsheet.
  115.  
  116. 5. A music sampler for the top 10 hits of the week.
  117.  
  118.                 3
  119.  
  120.                     When should I choose UltraCard?
  121.  
  122. UltraCard is good for use when you have a simple user-interface task and a
  123. wide variety of information to communicate.  You can construct applications
  124. that contain the full variety of Amiga facilities such as windows, menus,
  125. sound and graphics.  Using the UltraCard Plus' external library facility
  126. you can even add features to UltraTalk that expand its capabilities.  If
  127. you have purchased UltraCard you may upgrade to UltraCard Plus by
  128. contacting Intuitive Technologies at (408) 646-9147.
  129.  
  130.                 4
  131.  
  132.                   Summary of UltraCard Specifications:
  133.  
  134. * Support Amiga screen configurations:
  135.  
  136. 320 or 640 pixel wide screen (supports MoreRows & PAL also)
  137.  
  138. 200 or 400 pixel high screen (supports MoreRows & PAL also)
  139.  
  140. Overscan 704 or 354 by 240 or 480
  141.  
  142. 2, 4, 8, 16, 32 or 64 (half-brite) colors
  143.  
  144. * Object oriented drawing tools including bitmap objects
  145.  
  146. Bitmap objects can be layered for sophisticated effects.
  147.  
  148. * Text, IFF and object oriented printing capability.
  149.  
  150. * UltraTalk scripting language for associating actions with objects.
  151.  
  152. Full featured language including built-in and user written functions and
  153. external library support.
  154.  
  155. * Find and Sort facilities for "database" stacks.
  156.  
  157.                 5
  158.  
  159. * Built-in Hypertext that associates action with words or phrases in text
  160.   objects.
  161.  
  162. * ARexx support.
  163.  
  164. ARexx is a program, by William Hawes, that allows programs to communicate
  165. with each other.  UltraCard can both send ARexx commands to other programs
  166. as well as listen for commands to UltraCard from other programs.  This all
  167. means that you can create a custom environment which can allow the use of
  168. many programs together at a single click of the mouse.
  169.  
  170. Terminology Note:
  171.  
  172. We use the terms OBJECT and BUTTON interchangably.  This is because most
  173. objects that you create using UltraCard perform some action when you click
  174. the mouse over them, i.e. "pushing the button".  In reality, a button is
  175. just a simple form of an object and all objects, including data entry
  176. fields, can take action when "pushed".
  177.  
  178.                 6
  179.  
  180.                         GETTING STARTED
  181.  
  182. Copying your distribution disk
  183.  
  184. UltraCard is not copy protected.  Please, since we have created the freely
  185. distributable browser, spread the WORD not the SOFTWARE.  Your cooperation
  186. is critical to the continued support and enhancement of the UltraCard
  187. software.  Please make a copy of your distribution disk.
  188.  
  189.                 7
  190.  
  191. Configuring UltraCard on Floppy Disks
  192.  
  193. UltraCard comes complete and ready to use.  We have not installed the
  194. UltraCard program on a version of the standard Workbench disk.  So to use
  195. UltraCard you should start your Amiga from your standard Workbench and then
  196. either put the UltraCard disk in the drive or copy the files to your hard
  197. disk (if present).  If you wish to move UltraCard to another floppy
  198. configuration you need the following minimum set of files to use UltraCard:
  199.  
  200.     UltraCard - the program
  201.     Stacks/Control Room - the default stack
  202.  
  203.     If you want to use the Help key you need:
  204.     Stacks/Help - the UltraCard help stack.
  205.  
  206. Configuring UltraCard on Hard Disks
  207.  
  208. Using Ultra CArd with a hard disk allows you to use even more capabilites
  209. that are built into the software.
  210.  
  211. In particular, the IFF/PAINT menu item can execute a program to change the
  212. backdrop pictures.  You can set the name and path of this program using the
  213. PAINT: button in the ControlRoom stack.  Using this with a hard disk is
  214. easy.
  215.  
  216. To install UltraCard on a hard disk simply copy the program icon and the
  217. Stacks drawer to your hard
  218.  
  219.                 8
  220.  
  221. disk.  When you run UltraCard it looks for the stacks in a drawer (on a
  222. logical device or floppy named ULTRA:) called STACKS.
  223.  
  224. The UltraCard ControlRoom allows you to change the search path for stacks. 
  225. Examine and modify the Preferences frame.  Simply click on the MORE...
  226. button on the first frame of the ControlRoom and then click on the EVEN
  227. MORE... object on the next frame displayed.  Then click on the multi-line
  228. object at the bottom of the screen to edit the paths.  When you have the
  229. paths set up the way you want then click on the PATHWAYS button to make
  230. these path changes permanent.
  231.  
  232. Put the following line in your s:startup-sequence file to use UltraCard on
  233. your hard disk:
  234.  
  235.     ASSIGN ULTRA: DH0:
  236.  
  237. This assumes that you put the STACKS directory on the top level of your
  238. hard disk.
  239.  
  240. Running UltraCard from the CLI
  241.  
  242. If you want to run UltraCard from the CLI you MUST make sure your stack is
  243. at least 15,000 bytes big.  Type STACK at the CLI prompt to see the current
  244. setting.  The default for AmigaDOS is 4000.  To change the stack size type:
  245.  
  246.     STACK 15000
  247.  
  248.                 9
  249.  
  250. Loading UltraCard
  251.  
  252. If you run UltraCard from the Workbench then simply double click on the
  253. program icon (or click and select Open) to run the program.
  254.  
  255. If you want to run UltraCard from the CLI/Shell you MUST MAKE SURE THAT
  256. YOUR STACK IS AT LEAST 10,000 bytes big.  If you don't understand this
  257. requirement refer to a manual on the AmigaDOS CLI.
  258.  
  259. UltraStacks are saved with icons and an icon may be opened which
  260. automatically starts the browser version of the program.
  261.  
  262.                 10
  263.  
  264. LEAVING ULTRACARD
  265.  
  266. When you are done using the UltraCard simply choose QUIT from the PROJECT
  267. menu to return to the Workbench or CLI.  If you have run other programs
  268. (via the WORKBENCH statement) UltraCard will wait until all these other
  269. programs are complete before quitting.  Don't worry if this seems confusing
  270. at first it will become clear as you become more proficient in using
  271. UltraCard.
  272.  
  273.                 11
  274.  
  275. The ControlRoom Stack
  276.  
  277.                 PROGRAMS    STACKS
  278.  
  279.         IDEAS        MORE...
  280.  
  281. The Starting point and the Return.
  282.  
  283. The ControlRoom stack is the first stack you use when using the UltraCard
  284. program.  From this stack you can open other stacks, run programs, and ask
  285. for help.
  286.  
  287. Most stacks contain a miniature picture of the ControlRoom screen display. 
  288. By clicking on this picture the current stack will close and the
  289. ControlRoom will open.  In this way, the ControlRoom acts as a "Grand
  290. Central Station" for UltraCard providing a consistent, dependable launching
  291. point each time the program is used.
  292.  
  293.                 12
  294.  
  295. You will find a return-to-ControlRoom button in the sample button stacks
  296. which you can copy and paste into your own stacks.
  297.  
  298.                 13
  299.  
  300. Loading Other Stacks
  301.  
  302. On the ControlRoom opening screen you can see the four smaller "screens". 
  303. Each of these screens has one or more "buttons" on which you can click.  To
  304. see where the buttons are hold down the Left ALT key and then press the
  305. Ctrl Key.  The location of all currently active buttons is shown by a
  306. dotted line rectangle around each object.
  307.  
  308. Click on the button named "Stacks" and the current frame will close and the
  309. SELECT-A-STACK frame will appear.  On this frame are names of some of the
  310. various sample stacks included with UltraCard.  Simply click on the stack
  311. you wish to open and it will be done.  In the Manual stack it explains how
  312. to add icons to this frame for your stacks.
  313.  
  314. You can, at any time, choose Open Stack from the Project menu.  This will
  315. display a file selector from which you can pick a stack file.
  316.  
  317. Setting the Pathways
  318.  
  319. UltraCard normally searches the ULTRA: directory and then the ULTRA:STACKS
  320. directory for opening stacks.  Clicking on the More... button on the first
  321. screen of the ControlRoom stack and then the Even More... button you can
  322. then click on the
  323.  
  324.                 14
  325.  
  326. UltraCard Operating Basics
  327.  
  328. You need to know the basics of navigation through the UltraCard universe to
  329. use the Control Room and the on-disk Manual, Tutorial and Help stacks. 
  330. Once you have read this section you can begin using the disk based
  331. information and return to the manual once you have begun exploring
  332. UltraCard.
  333.  
  334. UltraCard operates like other Amiga applications in the following ways:
  335.  
  336.     1. The left mouse button is used to make non-menu selections.
  337.  
  338.     2. The right mouse button is used to make menu selections.
  339.  
  340.     3. The UltraCard screen can be dragged top-to-bottom.  If the 
  341.        screen title bar is visible.  To toggle the title bar, press
  342.        F5.
  343.  
  344.     4. UltraCard is a well behaved multi-tasking application and can
  345.        be run with other Amiga software simultaneously.
  346.  
  347.        When UltraCard is idle it takes NO system time as it is
  348.        waiting for a mouse click.
  349.  
  350.     5. UltraCard screens have, while not always visible, front-to-back
  351.        gadgets and back-to-front gadgets.  In some cases you may
  352.  
  353.                 15
  354.  
  355.        have to turn the title bar on (press F5) to access the drag
  356.        bar or depth gadgets.
  357.  
  358.     6. UltraCard is fully compatible with both NTSC and PAL systems.
  359.  
  360.                 16
  361.  
  362. Objects
  363.  
  364. The fundamental building block of UltraCard is the object.  The object can
  365. appear as a button, a data entry field, a multi-line field, scroll arrows,
  366. a bitmap image or combinations of the above.
  367.  
  368. We often times use the words button and object interchangably as clicking
  369. on most objects acts like the push of a button.
  370.  
  371. Some objects, like data entry fields, allow you to type data which is kept
  372. inside the object.  This data can be used by an UltraTalk script to print,
  373. calculate or make decisions.
  374.  
  375.                 17
  376.  
  377. Browsing
  378.  
  379. Moving through an UltraCard stack is called BROWSING.  Your switch, or
  380. NAVIGATE, between frames using the selections from the GO menu or by using
  381. the arrow or Right-Amiga keyboard shortcuts.  Often there are objects on a
  382. frame which respond to the mouse.
  383.  
  384. Selecting Objects with the mouse
  385.  
  386. You select an object, triggering an action, by clicking the left mouse
  387. button with the mouse pointer (the pointing hand) over the object.  Like
  388. standard Amiga gadgets you must release the mouse button with the mouse
  389. pointer over most objects for action to take place.
  390.  
  391. Like gadgets, there are exceptions.  Some objects respond immediately when
  392. the mouse button is clicked down.  Some objects highlight by inverting
  393. their contents when clicked and some draw an outline.  Some even cause
  394. other, invisible fields, to appear when the mouse is held down and
  395. disappear when it is released.  You have full capability to create all
  396. these types of responses using UltraCard.
  397.  
  398.                 18
  399.  
  400. Changing Frames
  401.  
  402. Most UltraCard stacks are made up of multiple frames of information. 
  403. Moving between these frames, or navigating, is one of the fundamental
  404. skills needed to use UltraCard.  As you move from frame to frame there are
  405. a variety of visual effects you will see including wipes, fades, slides and
  406. more.  Look at the appendix for a listing fo the available visual effects.
  407.  
  408. Using the GO Menu
  409.  
  410. The GO menu allows you to move to the first, next, previous or last frame
  411. in a stack.  You can select the menu items or use the Right Amiga shortcuts
  412. which correspond to the legends on the numeric keypad keys.
  413.  
  414.                 19
  415.  
  416. Using the Arrow Keys
  417.  
  418. The arrow keys on the keyboard can also be used to move about in the
  419. UltraCard stack as shown below:
  420.  
  421.     Up Arrow    = First Frame
  422.     Down Arrow    = Last Frame
  423.     Right Arrow    = Next Frame
  424.     Left Arrow    = Previous Frame
  425.  
  426. (Note for experienced users:  You can, by writing handlers for the
  427. UP.ARROW, DOWN.ARROW, LEFT.ARROW and RIGHT.ARROW messages, intercept the
  428. standard meaning of the arrow keys.  You can also interpret the shift and
  429. control keys when pressed with an arrow.  An example of this is in the
  430. Ultradex stack in which we supply handlers for the RIGHT.ARROW and
  431. LEFT.ARROW messages so that frame switching is done without visual effects
  432. to increase the speed of flipping through the names in the stack).
  433.  
  434. Going BACK
  435.  
  436. After you have been moving from frame to frame you can use the Go/Back menu
  437. item (or Right-Amiga-B shortcut) to retrace your steps.  Each time you
  438. select Go/Back the frame you viewed before the currently visible frame will
  439. be displayed.  The BACK list has a limit of 25 frames.
  440.                 
  441.                 20
  442.  
  443. Using the Recent Frame Selector
  444.  
  445. While using Go/Back is useful for navigating a short distance back, the
  446. Recent Frame selector allows you to select, at random, any of the last 25
  447. UNIQUE frames you have seen.  These can be in a single or in multiple
  448. stacks.  Choose Go/Recent from the menu and then select the desired from
  449. the selector.
  450.  
  451.                 21
  452.  
  453. Accessing the Intuitive Technologies BBS
  454.  
  455. We maintain a 24-hour BBS system containing UltraCard stacks, 3rd-party
  456. demonstration stacks and a Question & Answer database.  The phone number
  457. for the BBS is:
  458.  
  459. (408) 373-4018
  460.  
  461.                 22
  462.  
  463. Distribution of the Browser
  464.  
  465. On your UltraCard disk is a program called UCBrowser.  This is a special
  466. version of UltraCard which cannot modify stacks but can read and navigate. 
  467. This program is freely redistributable (BUT NOT PUBLIC DOMAIN).  This
  468. program you can give to your friends, with your favorite stack.
  469.  
  470. If you are a commercial venture and wish to create stacks, such as help
  471. files, for your firm please contact us at Intuitive Technologies before you
  472. distribute Browser.  it is still free, we just want to make sure that
  473. everyone distributing the Browser always has the current version.
  474.  
  475.                 23
  476.  
  477.                  UltraTalk Language Specification
  478.  
  479. INTRODUCTION
  480.  
  481. To the reader: This is a specification of UltraTalk.  It is not a tutorial.
  482. We have included all statements, messages, and global variables as well as
  483. examples of each.  To edit the script for an object, click on the object
  484. and select SCRIPT.. from the PROPERTIES menu or double click on the object.
  485. If the object moves unexpectedly you can put the object back in its
  486. original position by choosing UNDO from the EDIT menu (use Right-Amiga-Z).
  487.  
  488. An example of the UltraTalk script editor is shown below.  Check the Editor
  489. Menus frame in the HELP stack for information about using the Editor.
  490.  
  491. GENERAL SYNTAX RULES
  492.  
  493. UltraTalk is a line oriented language.  Comments begin with two dashes and
  494. lines are continued by placing an exclamation point (!) at the end of the
  495. line.  Capitalization is not significant and multiple spaces and tabs are
  496. treated as a single space.  Statement labels (see GOTO below) are denoted
  497. by a leading AND trailing colon (e.g. :MYTOPOFLOOP:).
  498.  
  499.                 24
  500.  
  501. Spaces are not necessary between operators (e.g. A + B is the same as A+B).
  502. Variables are significant up to and may not be longer than 256 characters.
  503.  
  504. Script text is stored separately from the actual executable script code so
  505. there is no execution time penalty for heavily commented code.  Variable
  506. name length is only significant (as it relates to execution time) if the
  507. names exceed 20 characters in length.
  508.  
  509. DATA VALUES
  510.  
  511. Data values in UltraTalk are always stored as character strings.  If a
  512. computation is indicated (e.g. ADD a TO b) the strings are converted to
  513. numbers, the calculation performed, and the number converted back to a
  514. string.  This makes the job of creating scripts much easier since you don't
  515. have to worry about variable typing.
  516.  
  517. OBJECTS, FRAMES, BACKDROPS & STACKS
  518.  
  519. UltraCard stacks are built from only three fundamental building blocks: the
  520. Object, the Frame and the backdrop.
  521.  
  522. A stack consists of at least one backdrop and one frame and zero or more
  523. objects.  A Backdrop and a Frame are nearly identical.  A Backdrop can be
  524. thought of as a common background over which one or more frames are drawn.
  525. Both a Backdrop and a Frame can
  526.  
  527.                 25
  528.  
  529. "contain" zero or more objects.  These objects take the form of "buttons",
  530. data entry fields or multi-line values.  They can be solid or clear, filled
  531. with colors or graphics or proportional gadgets (sliders) and can have a
  532. name which can be (optionally) displayed inside or outside the object.
  533.  
  534. A graphic representation of the relationship between a backdrop and frames
  535. is shown below.  We use the UltraCard help stack as an example:
  536.  
  537. HELP stack (consisting of 2 bdrops, 8 frame)
  538.  
  539. BIRD'S EYE VIEW OF A STACK:
  540.  
  541. Backdrop 1
  542.   Frame 1 (main menu)
  543. Backdrop 2
  544.   Frame 2 (browse menus)
  545.   Frame 3 (modify menus)
  546.   Frame 4 (objects)
  547.   Frame 5 (keyboard)
  548.   Frame 6 (UltraTalk statements)
  549.   Frame 7 (Functions)
  550.   Frame 8 (Editor menus)
  551.  
  552. A more detailed diagram of the first three frames is shown below:
  553.  
  554.                 26
  555.  
  556. +--------------------------Backdrop Level
  557. |
  558. |  +------------------------ Backdrop Object Level
  559. |  | 
  560. |  |   +------------------------Frame Level
  561. |  |   |
  562. |  |   |   +-----------------------Frame Object Level
  563. |  |   |   |
  564. |  |   |   |
  565.  
  566. Backdrop 1 (with picture of boxes & lines)
  567. ....
  568. .. Frame 1
  569. ....
  570. ... About Object
  571. ... Menus Object
  572. ... UltraTalk Object
  573. ... Keyboard Object
  574. .   .. Objects Object
  575. Backdrop 2 (blue background)
  576. . Back to first arrow (Graphic fill)
  577. .. Frame 2 (Browse menus)
  578. ....
  579. ... Project Menu (graphic fill)
  580. ... Edit Menu    (graphic fill)
  581. ... Go Menu      (graphic fill)
  582. ... Browse Menus (name shown inside)
  583. ... Modify Menus (name shown inside)
  584. ....
  585. .. Frame 3  (Modify menus)
  586. ....
  587. ... Edit Menu       (graphic fill)
  588. ... Properties Menu (graphic fill)
  589. ... Contents Menu   (graphic fill)
  590. ... Editor Menus    (name shown inside)
  591. ... Modify Menus    (name shown inside)
  592.  
  593.                 27
  594.  
  595. As you can see each frame sits atop a backdrop and multiple frames can
  596. share a single backdrop.  The backdrop contains the background IFF picture
  597. and any objects common its child frames (such as the Back to First arrow
  598. shown above).
  599.  
  600. MESSAGES
  601.  
  602. The central idea of UltraCard and consequently UltraTalk is the message.  A
  603. message is simple a "signal" resulting from either an action by the user or
  604. an internally generated condition detected by the program, such as a time
  605. counter, signifying that something has happened.  Each of the components of
  606. the UltraCard program and the backdrop, frame and objects of your UltraCard
  607. stack "listen" for messages that apply to them.  As each object is
  608. "activated" it inserts itself into the listening list.  When a message is
  609. "sent" it is simply given to the first listener in the list who checks to
  610. see if it si the message that that listener is waiting for.  It is not then
  611. the message is given to the next listener in the list and so on until the
  612. message either "falls out the bottom" or one of the listeners determines
  613. that the message is to be processed and handles the request coded into the
  614. message.  This is why listeners are also called "message handlers".
  615.  
  616.                 28
  617.  
  618. MESSAGE HIERARCHY
  619.  
  620. As mentioned in the previous paragraph, there is a definite hierarchy to
  621. the listener list.  A message, when sent, is given to the topmost listener
  622. (or handler) on the list who determines if the message is of interest.  If
  623. it is not applicable to that handler (e.g. not a click in the button
  624. associated with that handler) the handler passes the message on to the next
  625. handler in the list.
  626.  
  627. It is this hierarchy of messages that makes it possible to write complex
  628. programs using UltraCard.  Mouse clicks, key strokes, menu selections, etc.
  629. all generate messages.  Only the handler listening for a specific message
  630. actually takes action on any given message.  The hierarchy shown below
  631. shows how the handlers are ordered.
  632.  
  633. FRAME OBJECTS
  634.   FRAME
  635.     BACKDROP OBJECTS
  636.       BACKDROP
  637.         STACK
  638.           CONTROLROOM STACK
  639.             ULTRACARD
  640.  
  641. What this means is that when an action occurs, such as a mouse click, it is
  642. sent to the topmost Frame object,
  643.  
  644.                 29
  645.  
  646. which examines it to see if it is within the object's rectangle, if not
  647. then it passes it to the next layer down, and so forth until it either
  648. finds a handler that processes the message or UltraCard handles the mouse
  649. click directly (e.g. when you are creating objects).  Any handler can pass,
  650. process or process and then pass a message. (See the PASS statement).
  651.  
  652. MESSAGE TRANSFORMATION
  653.  
  654. As you become more familiar with UltraCard you will find that you write the
  655. script for an object as handlers for the SELECT.UP and SELECT.DOWN
  656. messages.  These messages are created by the built-in button object handler
  657. that processes the CLICK.DOWN and CLICK.UP messages generated by the
  658. internal program code.  When the button object detects a mouse click inside
  659. an object it sends a SELECT.DOWN/SELECT.UP directly to the script handler
  660. for your object.  This is done so that your script didn't have to check
  661. each mouse click to see whether the click was in the object, the UltraCard
  662. program does that for you.  This means that when your object receives a
  663. SELECT.DOWN or SELECT.UP message that you are already guaranteed that the
  664. mouse was clicked inside your object.
  665.  
  666.                 30
  667.  
  668. MESSAGE HANDLERS
  669.  
  670. We have talked about objects, messages and handlers.  A message handler is
  671. an UltraTalk subroutine that processes a specific message.  A message
  672. handler uses the syntax shown below:
  673.  
  674.     MESSAGE.NAME:
  675.      -- your code
  676.          -- goes here
  677.     END_MESSAGE.NAME
  678.  
  679. The name of the message handled by the handler is put at the beginning and
  680. followed by a colon.  Your script code follows immediately after that
  681. (blank lines are ignored) and you put a line beginning with "END_" at the
  682. end of your handler.  It is convention but not required to put the name of
  683. the message after the underscore.
  684.  
  685. Most message handlers that you will code will be those to handle messages
  686. generated by the UltraCard program such as SELECT.DOWN and SELECT.UP or
  687. timer messages such as SECOND.TICK, etc.  You can also write subroutines
  688. for your own messages that you design.  Using this mechanism you can create
  689. your own built-in functions:
  690.  
  691.                 31
  692.  
  693.     MY.SUBROUTINE:
  694.       put parm(1) + parm(2) into answer 
  695.           return answer
  696.     END_MY.SUBROUTINE
  697.  
  698.     SELECT.DOWN:
  699.       put MY.SUBROUTINE(5,3) into result
  700.       say result
  701.     END_SELECT.DOWN
  702.  
  703. All statements in UltraCard are simply messages that are sent and handled
  704. by the built-in handlers.  For example, when you code a PUT statement it
  705. simply sends a message "PUT" and whatever handler gets and processes that
  706. message first implements the PUT statement.  Therefore any name you create
  707. for a built-in function simply sends that name as a message (see the
  708. example above).  Built-in functions can have up to 10 parameters.
  709.  
  710. VARIABLES -- Local & Global
  711.  
  712. Within your message handlers you can create temporary "containers" for
  713. strings and numerical values just by naming them where necessary, such as
  714. the target of a PUT statement:
  715.  
  716.     PUT 3 into COUNTER
  717.  
  718. This declares a "local" variable named counter.  Local variable only exist
  719. while the handler is being executed
  720.  
  721.                 32
  722.  
  723. and are discarded when the END_ statement is reached.
  724.  
  725. If you want to communicate between handlers to save values between
  726. execution of a handler you need to use a "global" variable which is created
  727. using the GLOBAL statement.  Global variables exist from the time you
  728. create them until you close the stack.
  729.  
  730. There are a number of GLOBAL variables that are predefined by the UltraCard
  731. program.  You will find a list of these variables, their default values and
  732. the actions they control listed later in this document.
  733.  
  734. STATEMENT Handlers
  735.  
  736. Each UltraCard statement performs a task for you in a script.  The first
  737. item on a line is the name of the statement.  This is followed by a blank
  738. if there are any parameters and the parameters are separated by blanks and
  739. sometimes optional keywords.
  740.  
  741.     Optional items are shown in braces { }
  742.  
  743.     Expressions are shown as <expr>
  744.       and can be any string or numeric
  745.         expression as appropriate
  746.  
  747.     The word "THE" is always ignored if
  748.       written separately to make statements
  749.       more readable:
  750.  
  751.                 33
  752.  
  753.       add THE cost to THE result
  754.  
  755.     could also be written:
  756.  
  757.       add cost to result
  758.  
  759. The statement handlers are described later in this document and in the HELP
  760. stack.
  761.  
  762. FUNCTION Handlers
  763.  
  764. There are a variety of built-in functions available in UltraTalk.  They
  765. allow you to manipulate strings, do arithmetic conversions, take the
  766. absolute value of numeric numbers, etc.
  767.  
  768. Built-in functions, as well as user defined functions, can be used as part
  769. of an expression anywhere an expression is legal.  Parameters to the
  770. function are passed in parentheses and separated by commas:
  771.  
  772.     PUT WORD (1, line.var) INTO word.temp
  773.  
  774.                 34
  775.  
  776. Operators
  777.  
  778. UltraTalk expressions combine constants and variables using the following
  779. operators:
  780.  
  781.     Arithmetic Operators
  782.  
  783.     +        Addition
  784.     -        Subtraction
  785.     *        Multiplication
  786.     /        Division
  787.     ^        Exponentiation (e.g. 2^3)
  788.     Unary -        Negation 
  789.     Unary +        (allowed by ignored)
  790.     %        Remainder from 
  791.             integer divide
  792.             (NOTE: The arguments
  793.             are limited to
  794.             32 bit precision for
  795.             this operator)
  796.  
  797.                 35
  798.  
  799.     Relational Operators
  800.  
  801.     =        Equality
  802.     >        Greater Than
  803.     <        Less Than
  804.     >=        Greater Than or Equal
  805.     <=        Less Than or Equal
  806.     <>        Not Equal
  807.     is        Equality
  808.     contains    True if right string
  809.             is contained
  810.             in left string
  811.  
  812.     in        True if left string
  813.             is contained
  814.             in right string
  815.  
  816.     Boolean Operators
  817.  
  818.     NOT        Logical NOT
  819.     |        Logical OR
  820.     &        Logical AND
  821.     OR        Logical OR
  822.     AND        Logical AND
  823.  
  824.     Character Operators
  825.  
  826.     &&        String Concatenation
  827.  
  828.                 36
  829.  
  830.                         UltraTalk Statements
  831.  
  832. Each statement is described in three sections.  First the syntax of the
  833. statement is given.  If this syntax takes multiple lines each subsequent
  834. line is indented but you do not do this when typing in the statements into
  835. the program.  Following the syntax is a paragraph describing the function
  836. of that statement and finally an example of using the statement is given.
  837.  
  838. Optional arguments are put in braces {  }
  839.  
  840. When one option MUST be chosen the vertical bar means include one of the
  841. options.  (e.g. (ON | OFF) means use ON or OFF but one is required.
  842.  
  843. <expr> means any valid UltraTalk expression.
  844.  
  845. Sometimes names are used instead of <expr> but the meaning is the same.
  846.  
  847. Remember, case is never significant EXCEPT inside quoted strings and then
  848. not for comparisons.
  849.  
  850.                 37
  851.  
  852. Syntax:
  853. SAY    <string-expression>
  854.  
  855. Function:
  856.     Speaks the string through the Amiga's translator and narrator
  857. facilities (synthesized speech).  If the first character of the string is a
  858. tilde (~) then the string is not run through the translator but is assumed
  859. to already be in phoneme form suitable for the narrator device.
  860.  
  861. Example:
  862.     SAY "Hello from UltraCard"
  863.     SAY ""~PUH4L DAW2N MEH4NYUW3S"
  864.     -- (says "PULL DOWN MENUS")
  865.  
  866.                 38
  867.  
  868. Syntax:
  869. JUMP {TO} FRAME {ID} <expr1)
  870.      {OF {STACK} <expr2>}}
  871.      {WITH} {EFFECT}
  872.  
  873. Function:
  874.     Causes the UltraCard current frame to be changed to the specified
  875. new frame.  The new frame can be in the same stack or a different stack and
  876. if the screen resolution is the same you can use a visual effect by
  877. specifying the EFFECT keyword.  <expr1> is either the ID number (not
  878. sequence in stack number) or name of the new frame.  See the section
  879. describing visual effects for more information about using EFFECT.  <expr2>
  880. is the name of the stack and is normally in quotes.
  881.  
  882. <expr1> can also be one of the following keywords:
  883.  
  884.     NEXT
  885.     PREV
  886.     PREVIOUS
  887.     FIRST
  888.     LAST
  889.  
  890. which specify the frame by its relationship to the current frame or within
  891. the stack.
  892.  
  893. Example:
  894.  
  895. Jump to next
  896. JUMP TO FRAME 3 OF STACK "HELP" WITH EFFECT
  897.  
  898.                 39
  899.  
  900. Syntax:
  901. PUT <expr> {INTO | BEFORE | AFTER } <dest>
  902.  
  903. Function:
  904.     Stores the value of <expr> into, before or after the variable
  905. specified by <dest>.  Using BEFORE or AFTER results in a prepend or
  906. appending operation being performed.  Using INTO discards the old contents
  907. of <dest> and replaces it completely with the new value.
  908.  
  909. Example:
  910.     PUT 3 into counter
  911.     PUT "Name" into value1
  912.     PUT "BBB" into value2
  913.     PUT "AAA" before value2
  914.     PUT "CCC" after value2
  915.     -- results in value2 "AAABBBCCC" if
  916.     -- value 2 is NOT multi-line
  917.     -- If value2
  918.     -- is an object with the Multi-line
  919.     -- property TRUE then the value2 will
  920.     -- be equal to THREE separate lines:
  921.     -- AAA
  922.     -- BBB
  923.     -- CCC
  924.  
  925.                 40
  926.  
  927. Syntax:
  928. CYCLE.COLOR {OFF | ON <expr1>, <expr2>, <expr3>}
  929.  
  930. Function:
  931.     Turns color cycling off and on.  <expr1> is the low color number to
  932. start the cycle, <expr2> is the high color number to end the cycle and
  933. <expr3> is the number of times per second to cycle.
  934.  
  935. Example:
  936.  
  937.     -- cycle 2->5 10 times per second
  938.        CYCLE.COLORS ON 2, 5, 10
  939.  
  940.     -- turn color cycling OFF
  941.        CYCLE.COLORS OFF
  942.  
  943.                 41
  944.  
  945. Syntax:
  946. SLEEP
  947.  
  948. Function:
  949.     Puts UltraCard to sleep by closing its screen and releasing as much
  950. memory as possible so that you can run other programs.  When the other
  951. program quits you normally use the WAKE.UP statement to restart UltraCard. 
  952. If you accidentally put UltraCard to sleep and forget the WAKE.UP statement
  953. you can wake it up by holding down the CTRL, Left-Shift and Left-Alt keys
  954. and clicking the mouse button
  955.  
  956. Example:
  957.     --- sleep to give up memory
  958.     SLEEP
  959.     WORKBENCH "DeluxePaintIII:DPAINT"
  960.     --- and then wake.up when Dpaint done
  961.     WAKE.UP
  962.  
  963.                 42
  964.  
  965. Syntax:
  966. WAKE.UP
  967.  
  968. Function:
  969.     Used after the SLEEP statement to "wake up" UltraCard.  Reallocates
  970. memory and reopens the UltraCard screen.
  971.  
  972. Example:
  973. (see SLEEP)
  974.  
  975.                 43
  976.  
  977. Syntax:
  978. SAVE.BRUSH object TO <filename>
  979.  
  980. Function:
  981.     Saves the contents of a graphic filled object as an IFF brush file.
  982. Saves the contents of the brush based upon the CURRENT dimensions of the
  983. object.  Graphic objects acquire a maximum size when they are created but
  984. can be "shrunk" so that only a portion of the object is visible either
  985. manually or under script control.  They can never be made bigger than their
  986. original size.
  987.  
  988. Example:
  989.  
  990.     -- save a button as a brush
  991.     SAVE.BRUSH object.23 TO !
  992.         "brushes/brush1"
  993.  
  994.                 44
  995.  
  996. Syntax:
  997. GRAPHIC.FILL object FROM <filename>, <1>, <t>, <w>, <h>
  998.  
  999. Function: 
  1000.     Loads an object from an IFF picture or brush.  It changes the fill
  1001. property of the object to "Graphic" if it is not already set that way.  If
  1002. the object is a BRUSH then you can specify l, w, t, h as 0, 0, 0, 0
  1003. otherwise they represent the left pixel, top pixel, width in pixels and
  1004. height in pixels of the region you wish to extract from the IFF picture to
  1005. insert into the object.
  1006.  
  1007. Example:
  1008.     -- get user's picture from IFF file
  1009.     GRAPHIC.FILL picture.obj FROM !
  1010.         "pict", 0, 0, 100, 100
  1011.  
  1012.                 45
  1013.  
  1014. Syntax:
  1015. SET.SCRIPT {OF} {STACK | FRAME | BDROP} TO <expr>
  1016.  
  1017. Function:
  1018.     This statement allows you to set the script of the specified level
  1019. from a multi-line value.  Don't forge to put in the linefeed characters
  1020. between the lines if you create the value from a script only.  The script
  1021. code so changes is not activated until the level being modified is exited
  1022. and then re-entered.  This is most often during scripts which create other
  1023. stacks.
  1024.  
  1025. Example:
  1026.     -- set the frame script of a stack
  1027.     -- under construction
  1028.     SET.SCRIPT OF FRAME TO !
  1029.       "FRAME.ENTRY: \OA" && !
  1030.          "  SAY Here.I.Am\OA" &&
  1031.          "END_FRAME.ENTRY\OA\OA"
  1032.  
  1033.                 46
  1034.  
  1035. Syntax:
  1036. MENUS {ON | OFF}
  1037.  
  1038. Function:
  1039.     UltraCard menus may be turned on and off using this statement.  You
  1040. would want to turn them off to prevent the user from modifying the stack. 
  1041. When the menus are turned off clicking on the right mouse button is
  1042. ignored.
  1043.  
  1044. Example:
  1045.     -- Make sure we have control
  1046.     MENUS OFF
  1047.     -- perform some work
  1048.     MENUS ON
  1049.  
  1050.                 47
  1051.  
  1052. Syntax:
  1053. SERIAL.OPEN {<baud-rate-expression>}
  1054.  
  1055. Function:
  1056.     Opens the serial port for reading and writing.  If
  1057. <baud-rate-expression> is missing the last rate set is used.
  1058.  
  1059. Example:
  1060.     -- Prepare to talk to laser disk
  1061.     SERIAL.OPEN 9600
  1062.  
  1063.                 48
  1064.  
  1065. Syntax:
  1066. SERIAL.CLOSE
  1067.  
  1068. Function:
  1069.     Closes the serial port which allows other programs to use it.
  1070.  
  1071. Example:
  1072.     -- close the serial port so I can print
  1073.     SERIAL.CLOSE
  1074.  
  1075.                 49
  1076.  
  1077. Syntax:
  1078. SERIAL.WRITE  <output-expression>
  1079.  
  1080. Function:
  1081.     Writes data to the serial port.  There are two global variables,
  1082. SERIAL.PREFIX and SERIAL.SUFFIX that are prepended and appended to the data
  1083. respectively before it is output.  Normally these are empty but, for
  1084. example, most laser disk players want a control-B (STX) "\02" at the
  1085. beginning and a control-C (EXT) "\03" at the end of the command string so
  1086. these variables can be used to save having to code those characters for
  1087. each write.
  1088.  
  1089. Example:
  1090.  
  1091.     -- output string to laser disk (hard way)
  1092.     SERIAL.WRITE "\02" && "PF" && "\03"
  1093.     DELAY 20    -- wait 2 seconds
  1094.     SERIAL.WRITE "\02" && "PR" && "\03"
  1095.     
  1096.     -- output strings to laser disk (easy way)
  1097.     PUT "\02" into SERIAL.PREFIX
  1098.     PUT "\03" into SERIAL.SUFFIX
  1099.  
  1100.     SERIAL.WRITE "PF" -- play forward
  1101.     DELAY 20      -- wait 2 seconds
  1102.     SERIAL WRITE "PF" -- play reverse
  1103.  
  1104.     -- both examples do the same thing
  1105.  
  1106.                 51
  1107.  
  1108. Syntax:
  1109. SERIAL.FLUSH
  1110.  
  1111. Function:
  1112.     This statement flushes any data present in the Amiga's serial
  1113. device buffer.  Useful to use before SERIAL.READ to make sure the
  1114. characters you get are "fresh".
  1115.  
  1116. Example:
  1117.  
  1118.     -- get some new characters
  1119.     SERIAL.FLUSH
  1120.     SERIAL.READ 15 TIMEOUT 250
  1121.  
  1122.                 52
  1123.  
  1124. Syntax:
  1125. MOVE.SCREEN <expr>
  1126.  
  1127. Function:
  1128.     This statement moves the UltraCard screen to a specific pixel line
  1129. on the display.  It can be used to partially reveal a screen underneath
  1130. UltraCard such as the workbench.
  1131.  
  1132. Example:
  1133.     -- move our screen down, reveal workbench
  1134.     MOVE.SCREEN 180        -- 20 pixels from bottom
  1135.     -- move our screen back to the top
  1136.     MOVE.SCREEN 0
  1137.  
  1138.                 53
  1139.  
  1140. Syntax:
  1141. SCREEN.TITLE <expr>
  1142.  
  1143. Function:
  1144.     The UltraCard screen normally has its title bar hidden from view so
  1145. that you can create full-screen applications.  You toggle the title bar on
  1146. and off using the F5 function key or by sending the KEY.F5 message.  The
  1147. screen title bar, when visible, normally displays the UltraCard version
  1148. number but you can change it to display any message you wish.
  1149.  
  1150. Example:
  1151.     -- Tell the user about our stack when
  1152.     -- the about button is clicked
  1153.     SCREEN.TITLE "My Stack -- Version 1.0"
  1154.     KEY.F5        -- Turn the title bar on
  1155.     DELAY 20    -- for two seconds
  1156.     KEY.F5        -- and turn it back off
  1157.  
  1158.                 54
  1159.  
  1160. Syntax:
  1161. CHANGE {.LINE | .WORD | .ITEM} <n> OF <var> TO <expr>
  1162.  
  1163. Function:
  1164.     This statement allows you to make a substitution in a multi-line
  1165. text value.  You can change a whole line, a word or an item.  An item is
  1166. separated by commas and words are separated by white space.
  1167.  
  1168. Example:
  1169.     -- change the 4th word on
  1170.     -- the line to "BLACK" from "WHITE"
  1171.     PUT "THE COW WAS WHITE" into value
  1172.     CHANGE.WORD 4 of value to "BLACK"
  1173.     -- value now contains:
  1174.     -- "THE COW WAS BLACK"
  1175.  
  1176.                 55
  1177.  
  1178. Syntax:
  1179. Choose From <v1> {SORT}
  1180.  
  1181. Function:
  1182.     This statement displays a list selector containing the values from
  1183. the multi-line expression <v1>.  The SORT keyword, if specified, sorts the
  1184. values in the list prior to display but does not change the value of <v1>.
  1185. The result of the choice is in the global variable IT.  If no choice is
  1186. made then IT contains the empty string "".
  1187.  
  1188. Example:
  1189.     -- ask the user
  1190.     CHOOSE FROM "RED\OAGREEN\OABLUE"
  1191.     -- displays in stated order, RED 1st
  1192.     CHOOSE FROM "RED\OAGREEN\OABLUE" SORT
  1193.     -- displays in sorted order BLUE 1st
  1194.     -- now IT contains the results
  1195.  
  1196.                 56
  1197.  
  1198. Syntax:
  1199. LOAD.SOUND  <filename> AS <soundname>
  1200.  
  1201. Function:
  1202.     This statement preloads a digitized sound file into the Amiga's
  1203. CHIP memory (i.e. that memory directly accessible by the specialized DMA
  1204. chips).  It assigns the sound a "soundname" which can be used for
  1205. subsequent reference to the sound.  Normally soundnames are shorthand
  1206. versions of the filename and if they contain only letters, numbers, periods
  1207. and underscores do not need to be put in quotes.
  1208.  
  1209. Example:
  1210.     -- load our sounds
  1211.     LOAD.SOUND "DH0:SOUNDFILES/BEEP" as BEEP
  1212.     LOAD.SOUND "DH0:SOUNDFILES/SQUAWK" as !
  1213.         SQUAWK
  1214.  
  1215.                 57
  1216.  
  1217. Syntax:
  1218. UNLOAD.SOUND <soundname>
  1219.  
  1220. Function:
  1221.     This statement removes a preloaded sound from CHIP memory therefore
  1222. making CHIP memory available for other uses such as other sounds or display
  1223. screens.  When UltraCard quits all preloaded sounds are unloaded
  1224. automatically.  They are NOT unloaded when you open a different stack
  1225. unless you explicitly unload them.
  1226.  
  1227. Example:
  1228.     -- unload our sounds and make more CHIP
  1229.     -- memory available
  1230.     unload.sound squawk
  1231.     unload.sound BEEP
  1232.  
  1233.                 58
  1234.  
  1235. Syntax:
  1236. WAIT.SOUND <soundname>
  1237.  
  1238. Function:
  1239.     This statement causes UltraCard to pause until a sound that was
  1240. played using the ASYNC option of the PLAY statement (see PLAY) is finished.
  1241.  In this way you can synchronize the displays of your stack with the
  1242. duration of the sound.  If the sound was not played with ASYNC no action is
  1243. taken.  You MUST use either with WAIT.SOUND or STOP.SOUND with sounds
  1244. played using ASYNC in order to be able to play them multiple times as it
  1245. releases system resources used for playing sounds.
  1246.  
  1247. Example:
  1248.     -- play a sound, rotate the ball and
  1249.     -- then wait for the sound to complete
  1250.     play long.sound async
  1251.     for i=1 to 10
  1252.         cursor wait
  1253.     endfor
  1254.     wait.sound long.sound
  1255.     cursor ready
  1256.  
  1257.                 59
  1258.  
  1259. Syntax:
  1260. STOP.SOUND <soundname>
  1261.  
  1262. Function:
  1263.     This statement causes a currently playing sound to stop
  1264. immediately.  This only works on sounds played using the ASYNC option of
  1265. the PLAY statement.
  1266.  
  1267. Example:
  1268.     -- play a sound
  1269.     -- but only part of it, the sound is 30
  1270.     -- seconds long but we'll only play 20
  1271.     -- seconds of it
  1272.     play long.sound async
  1273.     delay 200 -- 20 second delay
  1274.     stop.sound long.sound
  1275.  
  1276.                 60
  1277.  
  1278. Syntax:
  1279. Play {SOUND} {FROM} <sound-file-name> 
  1280.      {RATE <rate-expr>}
  1281.      {VOLUME <loudness-expr}
  1282.      {REPEAT <times>}
  1283.      {ASYNC}
  1284.  
  1285. Function:
  1286.     This statement plays digitized sounds using the Amiga's DMA
  1287. hardware.  Sounds must be stored as IFF or FutureSound format.  Either
  1288. one-shot or 8SVX sounds may be used.  The RATE keyword allows you to vary
  1289. the playback rate and is specified in Hz.  The VOLUME keyword allows you to
  1290. vary the playback volume and ranges from 0 (quiet) to 64 (maximum
  1291. loudness).  The REPEAT keyword allows you to repeat the sound a fixed
  1292. number of times.  The ASYNC keyword allows you to continue executing while
  1293. the sound is being played.  This is often used in conjunction with
  1294. digitized speech to show a message on the screen simultaneously with the
  1295. sound.  ASYNC can only be used with preloaded sounds, see LOAD.SOUND.
  1296.  
  1297. <sound-file-name> is either a disk file name or the name of a preloaded
  1298. sound (see LOAD.SOUND)
  1299.  
  1300.                 61
  1301.  
  1302. Example:
  1303.     -- play the sound normally
  1304.     Play "DH0:SOUNDFILES/BOGART"
  1305.  
  1306.     -- play it fast (record rate was 15000)
  1307.     Play "DH0:SOUNDFILES/BOGART" RATE 30000
  1308.  
  1309.     -- play a preloaded sound softly
  1310.     Play buzzer VOLUME 10
  1311.  
  1312.     -- play the buzzer 5 times
  1313.     Play buzzer REPEAT 5
  1314.  
  1315.     -- play a long sound and continue on
  1316.     Load.Sound "bogart.30sec" as bogie.long
  1317.     Play bogie.long ASYNC
  1318.     SHOW.MSG "Bogart was a movie actor" ! 
  1319.         for 5 seconds
  1320.     Wait.Sound bogie.long
  1321.     Unload.Sound bogie.long
  1322.  
  1323.                 62
  1324.  
  1325. Syntax:
  1326. CLI <prog-name> {INPUT file} {OUTPUT file}
  1327.  
  1328. Function:
  1329.     This statement allows you to run external programs as if they were
  1330. run from the AmigaDOS CLI (command-line-interface).  The <prog-name>
  1331. expression should contain the name of the program and all command line
  1332. arguments.  The INPUT clause allows you to specify I/O REDIRECTION, not an
  1333. input file name.  The OUTPUT clause similarly is related to I/O
  1334. REDIRECTION.
  1335.  
  1336. Example:
  1337.     -- if you would type: LIST >RAM:FOO #?.c
  1338.     -- use:
  1339.     CLI "LIST #?.c" !
  1340.         INPUT "NIL:" !
  1341.         OUTPUT "RAM:FOO"
  1342.     -- Note: some programs require input and
  1343.     -- output streams so you must use them
  1344.     -- like:
  1345.     CLI "program" INPUT "NIL:" OUTPUT "NIL:"
  1346.  
  1347.                 63
  1348.  
  1349. Syntax:
  1350. WORKBENCH <prog-name> {INPUT file} NOWAIT
  1351.  
  1352. Function: 
  1353.     This statement allows you to run external programs as if they were
  1354. run from the Workbench.  You can pass a file name to the program just as if
  1355. you had double clicked on a data file icon and automatically started the
  1356. program.  If you use the NOWAIT keyword the program will be started and
  1357. UltraCard will continue.  A "program handle" will be stored in the global
  1358. variable "IT".  You can save this handle if you need to synchronize with
  1359. the program later by using the WAIT statement (see below).  Programs
  1360. started in this way (asynchronously) must complete before UltraCard can
  1361. quit.
  1362.  
  1363. Example:
  1364.     -- start DeluxePaint from UltraCard
  1365.     -- Note: DPAINT cannot accept cmdline
  1366.     -- arguments for files so you must use
  1367.     -- it from the WORKBENCH statement
  1368.  
  1369.     WORKBENCH "DH0:DPAINT3/DPAINT" !
  1370.         INPUT "mypic"
  1371.  
  1372.     -- another example, make UC sleep, start
  1373.     -- DPAINT, wait for it to finish and
  1374.     -- wakeup again
  1375.     SLEEP
  1376.     WORKBENCH, "DeluxePaintIII:DPAINT" NOWAIT
  1377.     WAIT FOR IT
  1378.     WAKE.UP
  1379.  
  1380.                 64
  1381.  
  1382. Syntax:
  1383. WAIT {FOR} <prog_handle>
  1384.  
  1385. Function:
  1386.     This statement is used in conjunction with the WORKBENCH statement
  1387. to wait for a program started by the WORKBENCH statement to complete.  When
  1388. the WORKBENCH statement starts a program using the NOWAIT keyword it puts a
  1389. "handle" into the global variable IT.  You can put the contents of IT into
  1390. a global variable and then wait for the program to finish later.  You must
  1391. use the result from the WORKBENCH statement as an argument to WAIT.
  1392.  
  1393. Example:
  1394.     (see WORKBENCH statement)
  1395.  
  1396.                 65
  1397.  
  1398. Syntax:
  1399. GetFileName {FROM <dir>} {PROMPT <str>} {INTO <container>}
  1400.  
  1401. Function:
  1402.     This statement displays the UltraCard file selector and allows the
  1403. user to choose a file with the mouse.  If no file is selected the result is
  1404. "NO_FILE".  The FROM clause allows you to specify a starting directory. 
  1405. The PROMPT clause allows to set the title of the file selector window.  The
  1406. INTO clause allows you to direct the file name to be placed into a
  1407. variable.  If the INTO clause is missing the result is stored in the global
  1408. variable IT.
  1409.  
  1410. Example:
  1411.     -- get a stack name
  1412.     GetFileName FROM "ULTRA:STACKS" !
  1413.         PROMPT "Pick a stack" !
  1414.         INTO stack.name
  1415.     IF IT is "NO_FILE"
  1416.         say "You didn't pick a file"
  1417.     ELSE
  1418.         say "you picked: && it
  1419.     ENDIF
  1420.  
  1421.                 66
  1422.  
  1423. Syntax:
  1424. IF <expression> {THEN} 
  1425.     statements
  1426. {ELSE
  1427.     statements}
  1428. ENDIF
  1429.  
  1430. Function:
  1431.     This statement allows conditional execution of blocks of script
  1432. code.  The expression is evaluated and then examined.  If it is non-Zero
  1433. then the statements between the IF and the ENDIF are executed otherwise
  1434. they are skipped.  An optional ELSE statement can be used.
  1435.  
  1436. Example:
  1437.     put 1 into A
  1438.     put 2 into B
  1439.     if A > B
  1440.       say "A is greater than B"
  1441.     else
  1442.       say "A is less then B"
  1443.     endif
  1444.  
  1445.     if it is 0
  1446.       say "zero found"
  1447.     endif
  1448.  
  1449.                 67
  1450.  
  1451. Syntax:
  1452. Set {THE} <property-expr>
  1453.    OF <object-name> TO <expr>
  1454.  
  1455. Function:
  1456.     Each object in UltraCard has a variety of attributes that are
  1457. called "properties".  These include the objects location, size, file,
  1458. value, shape, etc.  Each of these properties can be manipulated by the
  1459. menus in Modify mode or by the SET statement.
  1460.  
  1461. Listed at the end of this document are the names of the properties and the
  1462. ranges of values they may take on.  You can use the GET statement to
  1463. retrieve the current value of a property and then use the SET statement to
  1464. the value of property to a new value.
  1465.  
  1466. There are two special properties and two special object names that are used
  1467. to signal to UltraCard whether to keep modifications after using SET.  The
  1468. properties are called MODIFIED.OBJECTS and MODIFIED.GRAPHICS and the
  1469. objects are "THE.FRAME" and "THE.BACKDROP".  They must be specified as
  1470. shown as THE is part of the name.
  1471.  
  1472. Example:
  1473.     -- make some temporary changes to an object
  1474.          set the fill.color of object.1 to 3
  1475.        set the name of object.2 to "Stop"
  1476.  
  1477.     -- and now make these changes permanent
  1478.        set the modified.objects of the.frame to 1
  1479.     -- Note: If you do not put in a statement
  1480.  
  1481.                 68
  1482.  
  1483.     -- like the one above the properties will
  1484.     -- revert to the original values when the
  1485.     -- frame is closed (i.e. you jump to another
  1486.     -- frame)
  1487.  
  1488.                 69
  1489.  
  1490. Syntax:
  1491. GOTO or GO TO <label>
  1492.  
  1493. Function:
  1494.     This statement changes the order of execution of script language
  1495. statements.  You specify the statement label on a line by preceding and
  1496. trailing colon.
  1497.  
  1498. Example:
  1499.     -- demo of GOTO statement
  1500.     if a > b then
  1501.       goto not.now
  1502.     endif
  1503.     --
  1504.     -- some other statements
  1505.     --
  1506.     :not.now:
  1507.     -- execution continues here after
  1508.     --the goto
  1509.  
  1510. Syntax:
  1511. GLOBAL <varname> {,varname}
  1512.  
  1513. Function:
  1514.     As previously described variables are only temporary unless
  1515. declared global.  This statement allows you to create global variables.  If
  1516. the variable is already created then this statement has no effect.
  1517.  
  1518. Example:
  1519.     -- declare some variables global
  1520.     GLOBAL flag, total, credit.value
  1521.  
  1522.                 71
  1523.  
  1524. Syntax:
  1525. ADD <expr> TO <dest>
  1526.  
  1527. Function:
  1528.     This statement adds the value of <expr> to the value of the object
  1529. or variable <dest>
  1530.  
  1531. Example:
  1532.     put 3 into value1
  1533.     add 5 to value1
  1534.     -- now value1 contains 8
  1535.  
  1536.                 72
  1537.  
  1538. Syntax:
  1539. SUBTRACT <expr> FROM <dest>
  1540.  
  1541. Function:
  1542.     This statement subtracts the value of <expr> from the value of the
  1543. object or variable <dest>.
  1544.  
  1545. Example:
  1546.     put 5 into value1
  1547.     subtract 2 from value1
  1548.     -- value1 now contains 3
  1549.  
  1550.                 73
  1551.  
  1552. Syntax:
  1553. MULTIPLY <dest> BY <value>
  1554.  
  1555. Function:
  1556.     This statement multiplies the value of <expr> into the value of the
  1557. object of variable <dest>.
  1558.  
  1559. Example:
  1560.     put 5 into value1
  1561.     multiply value1 by 10
  1562.     -- value1 now contains 50
  1563.  
  1564.                 74
  1565.  
  1566. Syntax:
  1567. DIVIDE <dest> BY <expr>
  1568.  
  1569. Function:
  1570.     This statement divides the object or variable <dest> by the value
  1571. of <expr>.
  1572.  
  1573. Example:
  1574.     put 50 into value1
  1575.     divide value1 by 10
  1576.     -- value1 now contains 5
  1577.  
  1578.                 75
  1579.  
  1580. Syntax:
  1581. GET <expr>
  1582. GET <property> OF <object>
  1583.  
  1584. Function:
  1585.     This statement performs one of two functions.  Without the OF
  1586. keyword it simply evaluates the value of <expr> and puts the results into
  1587. the global variable IT.  If the OF keyword is present then this statement
  1588. retrieves a specific property of an object and puts the value into the
  1589. global variable IT.
  1590.  
  1591. Example:
  1592.     -- Form 1 - evaluate expressions
  1593.  
  1594.     GET ABS(total) -- result in IT
  1595.     GET MY.SUBROUTINE(a,b,c)
  1596.  
  1597.     -- Form 2 - retrieve properties
  1598.  
  1599.     GET THE TOP.LINE of TEXT.AREA
  1600.     GET the LEFT.EDGE of OBJECT.1
  1601.  
  1602.                 76
  1603.  
  1604. Syntax:
  1605. Lock.Screen
  1606.  
  1607. Function:
  1608.     This statement "locks" the screen so that further jumps and
  1609. property changes are not shown.  When all your changes are complete then
  1610. use UNLOCK.SCREEN to restore the screen to normal operation.  If your
  1611. script completes and UltraCard is ready to listen again for mouse clicks,
  1612. etc. the screen is automatically unlocked.  Note: As described in the
  1613. UNLOCK.SCREEN documentation, UNLOCK.SCREEN uses the current setting of
  1614. VISUAL.EFFECT and performs an effect when unlocking the screen.
  1615.  
  1616. Example:
  1617.     -- move an object and make it pretty 
  1618.     lock.screen
  1619.     get the left.edge of object.1
  1620.     set the left.edge of object.1 to it+10
  1621.     unlock.screen
  1622.  
  1623.                 77
  1624.  
  1625. Syntax:
  1626. Unlock.Screen
  1627.  
  1628. Function:
  1629.     Used with LOCK.SCREEN.  Unlock.Screen restores the visual display
  1630. from the current frame using the current setting of the global variable,
  1631. VISUAL.EFFECT.  If the screen was not locked this statement has no effect.
  1632.  
  1633. Example:
  1634.     -- demo lock & unlock
  1635.     -- this saves the current frame (PUSH)
  1636.     -- and jumps to another frame, changes
  1637.     -- the value of an object, and then POP's
  1638.     -- back and unlocks the screen.  Visual
  1639.     -- seen by the user is NOTHING even
  1640.     -- though there were two frame changes.
  1641.  
  1642.     LOCK.SCREEN
  1643.     PUSH
  1644.     jump to frame 5
  1645.     add 1 to counter
  1646.     POP
  1647.     UNLOCK.SCREEN
  1648.  
  1649.                 78
  1650.  
  1651. Syntax:
  1652. PASS
  1653.  
  1654. Function:
  1655.     This statement causes the current message to be passed on down the
  1656. list of message handlers.  You would use this, for example, to process a
  1657. CLICK.DOWN message at the frame level and then pass it on to be handled at
  1658. the backdrop or stack level.
  1659.  
  1660. Example:
  1661.     -- click.down at frame level
  1662.     click.down:
  1663.          say "click at frame"
  1664.       pass -- so it can go to backdrop level
  1665.     end_click.down
  1666.  
  1667.                 79
  1668.  
  1669. Syntax:
  1670. POP
  1671.  
  1672. Function:
  1673.     Within UltraCard there is a 25-level push/pop stack that you can
  1674. use to save a stack/frame location combination (using PUSHP and then return
  1675. to the saved location without the returning script knowing where you are
  1676. returning to.  For example, when you press the HELP key or choose HELP from
  1677. the GO menu, the current frame on the screen is saved in the PUSH/POP stack.
  1678. While you are in the HELP stack the KEY.F10 message is intercepted by a
  1679. stack-handler and executes the POP statement so that you can continue
  1680. working exactly where you were before you went to the help stack.
  1681.  
  1682. Example:
  1683.     PUSH -- save our current frame
  1684.     JUMP to FRAME 5 of STACK "MY.OTHER.STACK"
  1685.  
  1686.     -- when a POP statement is executed the
  1687.     -- frame containing this script will be
  1688.     -- shown again
  1689.  
  1690.                 80
  1691.  
  1692. Syntax:
  1693. PUSH
  1694.  
  1695. Function:
  1696.     Save the current stack & frame on the PUSH/POP stack.  Later when a
  1697. POP statement is executed the current stack/frame combination will once
  1698. again be on the screen.  See the documentation for POP.
  1699.  
  1700. Example:
  1701.     -- example of POP
  1702.     POP -- return to stack that called us.
  1703.  
  1704.                 81
  1705.  
  1706. Syntax:
  1707. RETURN <expr>
  1708.  
  1709. Function:
  1710.     All UltraTalk handlers can be called as a function and the RETURN
  1711. statement creates whatever value is to be returned.  You can get any
  1712. expression to call a function or use the GET statement.
  1713.  
  1714. Example:
  1715.  
  1716.     MY.SAMPLE.FUNCTION
  1717.         put parm(1) into value
  1718.         multiply value by parm(2)
  1719.        return value
  1720.     END_MY.SAMPLE.FUNCTION
  1721.  
  1722.     -- call my function
  1723.     GET MY.SAMPLE.FUNCTION(5,10)
  1724.     -- now IT contains the result of 50
  1725.  
  1726.                 82
  1727.  
  1728. Syntax:
  1729. Send {TO object} message
  1730.  
  1731. Function:
  1732.     This statement sends an UltraTalk message.  It is most often used
  1733. to send a CLICK.DOWN/CLICK.UP message sequence to a button to simulate the
  1734. user clicking on the button.  If the TO clause is used then the global
  1735. variables MOUSE.X and MOUSE.Y are set to the location of the object before
  1736. the message is sent.
  1737.  
  1738. Example:
  1739.     -- simulate the user clicking on object.1
  1740.     SEND TO OBJECT.1 CLICK.DOWN
  1741.     SEND TO OBJECT.1 CLICK.UP
  1742.  
  1743.     -- This can also be used to send messages
  1744.     -- normally sent by the program
  1745.     SEND FRAME.ENTRY  -- Run it again
  1746.  
  1747.                 83
  1748.  
  1749. Syntax:
  1750. ENTER.MODIFY
  1751.  
  1752. Function:
  1753.     You can create a stack that modified itself using the modify mode
  1754. of UltraCard.  This statement changes from BROWSE mode to MODIFY mode just
  1755. as if you had pressed F2 on the keyboard.
  1756.  
  1757. Example:
  1758.     -- go into modify mode
  1759.     ENTER.MODIFY
  1760.  
  1761.                 84
  1762.  
  1763. Syntax:
  1764. EXIT.MODIFY
  1765.  
  1766. Function:
  1767.     This statement returns you to BROWSE mode.  If you are already in
  1768. browse mode it has no effect.  Normally this is used after ENTER.MODIFY.
  1769.  
  1770. Example:
  1771.     -- return to BROWSE mode.
  1772.     EXIT.MODIFY
  1773.  
  1774.                 85
  1775.  
  1776. Syntax:
  1777. NEW.OBJ <name>, <1>, <t>, <w>, <h>
  1778.         {FRAME | BACKDROP}
  1779.  
  1780. Function:
  1781.     This statement, used only when you are in MODIFY mode, creates a
  1782. new object using the name, location (l=left, t=top) and dimensions
  1783. (w=width, h=height) you specify.  You must specify whether this is to be a
  1784. FRAME layer or a BACKDROP layer object.
  1785.  
  1786. Example:
  1787.     -- create new obj under program control
  1788.     NEW.OBJECT "button",10,20,50,25
  1789.  
  1790.                 86
  1791.  
  1792. Syntax:
  1793. CUT
  1794.  
  1795. Function:
  1796.     This statement, used only when you are in MODIFY mode, copies the
  1797. currently selected object to the internal clipboard and then deletes the
  1798. object.  You may get the object back from the internal clipboard using
  1799. PASTE.
  1800.  
  1801. Example:
  1802.     -- check to see if there is a selection
  1803.     -- and then cut it to the clipboard
  1804.     -- SELECTION is a global variable which
  1805.     -- contains the ID of the object
  1806.     -- currently selected
  1807.  
  1808.     if selection is.not 0
  1809.         CUT
  1810.     else
  1811.         SHOW.MSG "No Object Selected"
  1812.     endif
  1813.  
  1814.                 87
  1815.  
  1816. Syntax:
  1817. COPY
  1818.  
  1819. Function:
  1820.     This statement, used only when you are in MODIFY mode, copies the
  1821. currently selected object to the internal clipboard.
  1822.  
  1823. Example:
  1824.     -- check to see if there is a selection
  1825.     -- and then copy it to the clipboard
  1826.     -- SELECTION is a global variable which
  1827.     -- contains the ID of the object
  1828.     -- currently selected
  1829.  
  1830.     if selection is.not 0
  1831.        COPY
  1832.     else
  1833.        SHOW.MSG "No Object Selected"
  1834.     endif
  1835.  
  1836.                 88
  1837.  
  1838. Syntax:
  1839. Paste
  1840.  
  1841. Function:
  1842.     This statement copies an object which has been placed on the
  1843. internal clipboard (using CUT or COPY) and puts it in the FRAME or
  1844. BACKDROP.  A Paste always pastes the object to the layer from which it was
  1845. Cut or Copy'd.  Paste always puts the object two (2) pixels lower and two
  1846. (2) pixels to the right of the original position.
  1847.  
  1848. Example:
  1849.     -- demo of the object Paste
  1850.     PASTE
  1851.  
  1852.                 89
  1853.  
  1854. Syntax:
  1855. Clear
  1856.  
  1857. Function:
  1858.     This statement, used only when you are in the MODIFY mode, deletes
  1859. the currently selected object.  THERE IS NO UNDO of this operation.
  1860.  
  1861. Example:
  1862.     -- check to see if there is a selection
  1863.     -- and then delete it
  1864.     -- SELECTION is a global variable which
  1865.     -- contains the ID of the object
  1866.     -- currently selected
  1867.  
  1868.     if selection is.not 0
  1869.        CLEAR
  1870.     else
  1871.        SHOW.MSG "No Object Selected"
  1872.     endif
  1873.  
  1874.                 90
  1875.  
  1876. Syntax:
  1877. SET.COLOR <color-num>,
  1878.      <Red>,<Green>,<Blue>
  1879.      <Save>
  1880.  
  1881. Function:
  1882.     This statement allows you to alter the color map of the current
  1883. screen.  <color-num> is a number from 0 to the max-number-of-colors minus 1
  1884. (e.g. 31 for a 32 color screen) and Red, Green and Blue are the RGB
  1885. components of the desired color.  The values may range fro 0 to 15.  If any
  1886. of them are equal to -1 then that color is not changed.  If the SAVE
  1887. keyword is specified then the BACKDROP is saved immediately with the new
  1888. color palette.
  1889.  
  1890. Example:
  1891.     -- change color 1 to white
  1892.     SET.COLOR 1,15,15,15
  1893.  
  1894.                 91
  1895.  
  1896. Syntax:
  1897. SELECT.OBJECT <obj name>
  1898.  
  1899. Function:
  1900.     This statement, used only in MODIFY.MODE, selects an object by
  1901. name.
  1902.  
  1903. Example:
  1904.     -- select an object
  1905.     SELECT.OBJECT object.1
  1906.  
  1907.                 92
  1908.  
  1909. Syntax:
  1910. DELAY (.1's of a second)
  1911.  
  1912. Function:
  1913.     This statement causes UltraCard to wait for the specified period of
  1914. time.  The count value given is in 1/10th of a second so to delay for 1
  1915. second use DELAY 10.
  1916.  
  1917. Example:
  1918.     -- Delay for 1/2 second
  1919.     DELAY 5
  1920.  
  1921.     -- Delay 10 seconds
  1922.     DELAY 100
  1923.  
  1924.                 93
  1925.  
  1926. Syntax:
  1927. ANSWER <expr> WITH <pos> {, <neg>}
  1928.  
  1929. Function:
  1930.     This statement displays a requester on the screen with the
  1931. question, from <expr>, displayed in the middle and the left gadget
  1932. containing the string <pos> and, if present, the right gadget containing
  1933. the string <neg>.  If <neg> is not supplied then both gadgets will contain
  1934. the same string.  The result, 0 or 1, will be stored in the global variable
  1935. IT.  If the user clicks on the gadget with the <pos> text in it then IT
  1936. will be 1, otherwise 0.
  1937.  
  1938. Example:
  1939.     -- ask an important question
  1940.     answer "Do you want to quit" with !
  1941.         "Yeah, Sure", "No way"
  1942.     if it is 1
  1943.        do.menu "quit" -- aw, shucks
  1944.     else
  1945.        say "Thank you, I'll continue"
  1946.     endif
  1947.  
  1948.                 94
  1949.  
  1950. Syntax:
  1951. ASK.VALUE {PROMPT <expr>}
  1952.     {INITIAL <expr>}
  1953.     {INTO var}
  1954.  
  1955. Function:
  1956.     This statement asks the user to input a value.  You can specify a
  1957. question, via the PROMPT clause, an initial value, via the INITIAL clause
  1958. and a destination, via the INTO clause.  If you do not specify an INTO
  1959. clause the result is put in the global variable IT>
  1960.  
  1961. Example:
  1962.     -- ask the user's name
  1963.     ASK.VALUE PROMPT "Enter your name" !
  1964.         INTO user.name
  1965.     SAY "THANK YOU " && USER.NAME
  1966.  
  1967.                 95
  1968.  
  1969. Syntax:
  1970. AREXX  {FROM file-name}
  1971.  
  1972. Function:
  1973.     This statement is the way in which you start an ARexx script from
  1974. UltraCard.  If you have the script stored in an external file use the FROM
  1975. clause to specify the name of the file.  Otherwise you "collect" ARexx
  1976. scripts within a script by enclosing them in lines that start with #BEGIN
  1977. and end with #END.
  1978.  
  1979.                 96
  1980.  
  1981. Example:
  1982.  
  1983.     SELECT.DOWN:
  1984.     -- script for a button that uses
  1985.     -- an embedded ARexx script that talks
  1986.     -- back to UltraCard and starts CygnusEd
  1987.     #BEGIN
  1988.     /* ARexx comment */
  1989.     options results
  1990.  
  1991.     /* Talk to UltraCard */
  1992.     address ULTRA1
  1993.     /* feed it an UltraTalk stmt            */
  1994.     /* to get the file name from UltraTalk        */
  1995.     /* global variable, file.name then        */
  1996.     /* pass to a script  loadced.rexx        */
  1997.     'get file.name'
  1998.     address rexx
  1999.     loadced.rexx result
  2000.     #END
  2001.  
  2002.     -- now get file name into the global
  2003.     GLOBAL file.name
  2004.     get.file.name into file.name
  2005.     if it is "NO_FILE"
  2006.         return -- user didn't select a file
  2007.     endif
  2008.  
  2009.     ARexx -- go start Arexx script collected
  2010.     -- above between #BEGIN and #END
  2011.     END_SELECT.DOWN
  2012.  
  2013.                 97
  2014.  
  2015. Syntax:
  2016. SCREEN {TO} {FRONT/BACK}
  2017.  
  2018. Function:
  2019.     This statement moves the UltraCard screen in relationship to the
  2020. other draggable screens in the Amiga display.  You could use this, for
  2021. example, to run some other program and then bring the UltraCard screen back
  2022. to the front, after moving it lower on the display to act as a help screen.
  2023.  
  2024. Example:
  2025.     -- This script uses a public domain
  2026.     -- program that displays an IFF file and
  2027.     -- listens via an ARexx port to commands
  2028.     -- which in this case are sent by UCard
  2029.     CLI "runback show" && picture.name !
  2030.         INPUT "NIL:" OUTPUT "NIL:"
  2031.     SCREEN.MOVE 180
  2032.     -- position to bottom of display
  2033.     SCREEN TO FRONT
  2034.     -- bring our display forward
  2035.     --
  2036.     -- at this point the picture is
  2037.     -- on the screen
  2038.     -- and UltraCard is still running and can 
  2039.     -- command the show program as necessary
  2040.  
  2041.                 98
  2042.  
  2043. Syntax:
  2044. FIND <string> {SUPPRESS.ERROR}
  2045.  
  2046. Function:
  2047.     This statement searches the UltraCard stack, bringing with the
  2048. frame AFTER the current frame for the string in any data field.  If the
  2049. string is found in any data field then the global variable FIND.OBJECT is
  2050. set to the ID of the string in which the object was found.  Normally, when
  2051. used from the menu, FIND displays an error requester if the string was not
  2052. found.  You may suppress that requester using the SUPPRESS.ERROR keyword.
  2053.  
  2054. Example:
  2055.     -- search for a string
  2056.     ask.value "Find what value?" into it
  2057.     find it
  2058.     -- now find.object contains the id
  2059.     -- of the object in which the string
  2060.     -- was found.
  2061.  
  2062.                 99
  2063.  
  2064. Syntax:
  2065. OPEN.FILE <name-expression> {OUTPUT}
  2066.  
  2067. Function:
  2068.     This statement opens an ASCII file for use by an UltraTalk program.
  2069. If the keyword OUTPUT is used the file is created otherwise the file is
  2070. assumed to exit.  If the open fails the global variable IT will contain the
  2071. value 0 otherwise it will contain "handle" which must be saved and used for
  2072. subsequent reading and writing.
  2073.  
  2074. Example:
  2075.     -- open a new text file
  2076.     GLOBAL FILE.HANDLE
  2077.     OPEN.FILE "RAM:MY.TEXT.FILE" OUTPUT
  2078.     IF it is 0
  2079.         show.msg "Couldn't open file"
  2080.         return
  2081.     ELSE
  2082.         put it into file.handle
  2083.     ENDIF
  2084.  
  2085.     WRITE.FILE file.handle from "Hello World"
  2086.     CLOSE.FILE file.handle
  2087.  
  2088.     -- open an old file
  2089.     GLOBAL FILE.HANDLE
  2090.     OPEN.FILE "RAM:MY.TEXT.FILE"
  2091.     IF it is 0
  2092.         show.msg "File not Found"
  2093.         return
  2094.     ELSE
  2095.         put it into file.handle
  2096.     ENDIF
  2097.  
  2098.                 100
  2099.  
  2100.     READ.FILE file.handle into it
  2101.     SAY IT
  2102.     CLOSE.FILE file.handle
  2103.  
  2104.                 101
  2105.  
  2106. Syntax:
  2107. READ.FILE <handle> {INTO <var>}
  2108.  
  2109. Function:
  2110.     This statement reads data from a text file previously opened via
  2111. OPEN.FILE and stores the results either into the global variable IT or a
  2112. destination of your choice if you use the INTO clause.
  2113.  
  2114.     It only reads one line of text at a time.  To read in multiple
  2115. lines you must use a loop.
  2116.  
  2117.     There is a global variable, IO.LENGTH which is set to the number of
  2118. characters actually read.  A blank line sets IO.LENGTH to 0 and end-of-file
  2119. sets IO.LENGTH to -1.
  2120.  
  2121. Example:
  2122.     -- assume a multi-line object named value
  2123.     OPEN.FILE "DATA.FILE"
  2124.     PUT IT INTO FILE.HANDLE
  2125.  
  2126.     READ.FILE FILE.HANDLE
  2127.  
  2128.     LOOP WHILE IO.LENGTH >= 0
  2129.         PUT IT AFTER VALUE
  2130.         READ.FILE FILE.HANDLE
  2131.     ENDLOOP
  2132.  
  2133.                 102
  2134.  
  2135. Syntax:
  2136. WRITE.FILE <handle> FROM <var>
  2137.  
  2138. Function:
  2139.     This statement writes data from a variable or an object to a text
  2140. file previously opened via OPEN.FILE.  If the value in the variable or
  2141. object is multi-line then this writes multiple lines to the output file.
  2142.  
  2143. Example:
  2144.     See OPEN.FILE
  2145.  
  2146.                 103
  2147.  
  2148. Syntax:
  2149. CLOSE.FILE <handle>
  2150.  
  2151. Function:
  2152.     This statement closes a file previously opened via OPEN.FILE.
  2153.  
  2154. Example:
  2155.     See OPEN.FILE
  2156.  
  2157.                 104
  2158.  
  2159. Syntax:
  2160. DELETE.FILE <name>
  2161.  
  2162. Function:
  2163.     This statement deletes a file from the disk.  It does not ask for
  2164. confirmation so be careful what file name you pass to it!!!
  2165.  
  2166. Example:
  2167.     -- ask for a file and delete it
  2168.     -- this script is conservative and
  2169.     -- asks the user to confirm his choice :)
  2170.     GLOBAL file.handle
  2171.     get.file.name into fn
  2172.     if fn is "NO_FILE"
  2173.        return  -- no file was chosen
  2174.     else
  2175.         answer "Delete " && fn !
  2176.         WITH "OK", "No! Don't Do it!"
  2177.         if it is 1
  2178.         DELETE.FILE fn
  2179.        else
  2180.             show.msg "File NOT deleted"
  2181.        endif
  2182.     endif
  2183.  
  2184.                 105
  2185.  
  2186. Syntax:
  2187. SORT BY <bdrop object>
  2188.  
  2189. Function:
  2190.     This statement rearranges the order of frames in a stack based upon
  2191. the value in a backdrop object.  Backdrop objects have their values stored
  2192. with the frame.  In this way you can have a single object with all of its
  2193. properties stored only once but a different value in each frame.  This
  2194. minimizes the amount of disk space and computing time required to use
  2195. UltraCard in data-base applications.  Therefore, this statement collects
  2196. all the strings from each frame associated with the specified object, sorts
  2197. the strings and then rearranges the order of the frames in the stack to
  2198. correspond to sorted order.
  2199.  
  2200. Example:
  2201.     -- from the UltraDex stack:
  2202.     SORT BY NAME
  2203.  
  2204.                 106
  2205.  
  2206. Syntax:
  2207. CURSOR {WAIT | READY | HAND | LOAD <filename>}
  2208.  
  2209. Function:
  2210.     This function changes the shape of the mouse cursor.  The WAIT
  2211. keyword changes the mouse cursor into the Amiga ball.  In fact, multiple
  2212. uses of CURSOR WAIT will rotate the ball.  READY changes the cursor back to
  2213. the current READY cursor.  HAND changes the cursor back to the standard
  2214. UltraCard hand cursor.  The LOAD option allows you to load in an external
  2215. cursor.  The external cursor file should be 80 bytes in length and is an
  2216. extraction from the standard Intuition Preferences structure.  If you don't
  2217. know what that means don't worry most PD cursor collections will work if
  2218. the files are 80 bytes long.  NOTE: IF YOU LOAD AN EXTERNAL CURSOR THEN THE
  2219. CURSOR WILL NOT CHANGE AS YOU SWITCH FROM BROWSE TO MODIFY MODE.
  2220.  
  2221. Example:    
  2222.     -- first, the rotating ball
  2223.     for count=1 to 10
  2224.         cursor wait
  2225.     endfor
  2226.     -- then back to the hand
  2227.     cursor hand
  2228.     -- load an external cursor
  2229.     cursor load "dh0:pointers/3darrow1.p"
  2230.  
  2231.                 107
  2232.  
  2233. Syntax:
  2234. DO.MENU <menu-item-name> {SUBITEM <expr>} {NO.REQUEST}
  2235.  
  2236. Function:
  2237.     This statement allows you, from within a script, to select a menu
  2238. item just as if the user has chosen it with the mouse.  The
  2239. <menu-item-name> is searched for the first match scanning down the menus
  2240. fro top to bottom beginning with the leftmost menu.  The string need not be
  2241. an exact match but the first partial match that is found will be executed. 
  2242. The argument to the SUBITEM clause is an integer beginning with 0 which
  2243. indicates which sub-menu item is selected.  If the keyword NO.REQUEST is
  2244. present then any confirmation request, such as that presented when you pick
  2245. the COMPACT STACK menu item will be suppressed and execution will continue
  2246. as if you had responded positively to the confirmation request.  Be
  2247. careful, if you use this with DELETE FRAME you could accidentally delete a
  2248. frame you wanted to keep so use NO.REQUEST carefully.
  2249.  
  2250. Example:
  2251.     -- compact a stack from within a script
  2252.     DO.MENU "COMPACT STACK" NO.REQUEST
  2253.  
  2254.     -- Jump to the last frame by selecting
  2255.     -- the GO/JUMP/LAST menu item
  2256.     -- from within a script
  2257.     DO.MENU "JUMP" subitem 3
  2258.  
  2259.                 108
  2260.  
  2261. Syntax:
  2262. SHOW.MSG line1,line2... up to line 8 {FOR <n> SECONDS}
  2263.  
  2264. Function:    
  2265.     This statement displays a message box of up to 8 lines of text and
  2266. an optional OK button on the screen.  You supply from 1 to 8 strings or
  2267. expressions representing the lines of text.  If you use the FOR clause then
  2268. the text will be shown for the specified number of seconds and no OK button
  2269. will be shown.
  2270.  
  2271. Example:
  2272.     -- simple one-line message with ok box
  2273.     -- this type of message is GREAT for
  2274.     -- debugging your scripts
  2275.     show.msg "This is a message"
  2276.     -- a complex multi-line message with ok
  2277.     show.msg "This is a multi-line", !
  2278.         "message shown using the ", !
  2279.         "SHOW.MSG", !
  2280.         "statement in UltraTalk"
  2281.  
  2282.     -- a message with time delay not ok box
  2283.     show.msg !
  2284.         "This message shows for 5 seconds" !
  2285.         for 5 seconds
  2286.  
  2287.                 109
  2288.  
  2289. Syntax:
  2290. MOVE object BY <xdist>,<ydist>
  2291.  
  2292. Function:
  2293.     This statement allows you to move an object around on the UltraCard
  2294. screen.  It allows simple movement type animations.  The movement distance
  2295. is in pixels and may be positive and negative.
  2296.  
  2297. Example:
  2298.     -- this example moves an object 100
  2299.     -- pixels to the right, 10 pixels
  2300.     -- at a time and then moves it back
  2301.     for count=1 to 10
  2302.        move object.1 by 10,0
  2303.     endfor
  2304.  
  2305.     for count=1 to 10
  2306.        move object.1 by -10,0
  2307.     endfor
  2308.  
  2309.                 110
  2310.  
  2311. Syntax:
  2312. FOR <var>=<start> TO <stop> 
  2313.         {STEP <step>} 
  2314.          -- statements
  2315. ENDFOR
  2316.  
  2317. Function:
  2318.     This statement simplifies the creation of loops in which the number
  2319. of iterations is known at the start of the loop.  If the step value is
  2320. positive then the <var> takes on values beginning with <start> and
  2321. INCREMENTING by <step> until it reaches or exceeds <stop>.  If the step
  2322. value is negative then the <var> takes on values beginning with <start> and
  2323. DECREMENTING by <step> until it reaches or becomes less than <stop>.  If
  2324. the STEP clause is not specified the step value is +1.
  2325.  
  2326. Example:
  2327.     -- count from 1 to 100
  2328.     for i=1 to 100
  2329.        say i
  2330.     endfor
  2331.  
  2332.     -- count down from 100 by 10's
  2333.     for i=100 to 1 step -10
  2334.        say i
  2335.     endfor
  2336.  
  2337.                 111
  2338.  
  2339. Syntax:
  2340. LOOP {WHILE <expr>}
  2341.       -- statements
  2342. ENDLOOP
  2343.  
  2344. Function:
  2345.     This statement creates a loop that continues forever or until some
  2346. condition is met (i.e. the WHILE <expr> becomes false, that is ZERO).  If
  2347. the loop is forever you must exit with a GOTO, or a BREAK statement.
  2348.  
  2349. Example:
  2350.     -- a forever loop that exits with BREAK
  2351.     put 1 into count
  2352.     LOOP
  2353.         add 1 to count
  2354.         if count >= 100
  2355.             break
  2356.         endif
  2357.     ENDLOOP
  2358.  
  2359.     -- a loop that uses a WHILE clause
  2360.     put 1 into count
  2361.     LOOP WHILE count < 100
  2362.         add 1 to count
  2363.     ENDLOOP
  2364.  
  2365.                 112
  2366.  
  2367. Syntax:
  2368. WHILE <expr>
  2369.  
  2370. Function:
  2371.     This statement is used in conjunction with the LOOP statement to
  2372. create loops with a text at the bottom.  When the <expr> becomes FALSE
  2373. (i.e. ZERO) then the loop is exited.
  2374.  
  2375. Example:
  2376.     -- loop with WHILE statement
  2377.     put 1 into count
  2378.     LOOP
  2379.         add 1 to count
  2380.     WHILE count < 100
  2381.     ENDLOOP
  2382.  
  2383.                 113
  2384.  
  2385. Syntax:
  2386. BREAK
  2387.  
  2388. Function:
  2389.     This statement is used with LOOP and FOR constructs.  When it is
  2390. encountered it causes control to pass to the first statement after the end
  2391. of the ENDLOOP or ENDFOR.
  2392.  
  2393. Example:
  2394.     -- loop exit using BREAK
  2395.     put 1 into count
  2396.     LOOP
  2397.         add 1 to count
  2398.         if count >= 100
  2399.             break
  2400.         endif
  2401.     ENDLOOP
  2402.  
  2403.     -- for exit using break
  2404.     FOR i=1 to 100
  2405.         if i = 55
  2406.             break
  2407.         endif
  2408.     ENDFOR
  2409.  
  2410.                 114
  2411.  
  2412. Syntax:
  2413. CONTINUE
  2414.     
  2415. Function:
  2416.     This statement is used with LOOP and FOR constructs.  When it is
  2417. encountered it causes control to pass to the beginning of the loop and the
  2418. remainder of statements in the loop are skipped.
  2419.  
  2420. Example:
  2421.     -- SAY only even numbers
  2422.     for i=1 to 100
  2423.         if i % 2 = 0
  2424.             continue -- bypass rest of loop
  2425.             endif
  2426.         say i
  2427.     endfor
  2428.  
  2429.                 115
  2430.  
  2431.                    ULTRATALK BUILT-IN FUNCTIONS
  2432.  
  2433. You may use a built-in function any place that a variable may be used
  2434. EXCEPT as a destination (such as PUT...INTO destination)
  2435.  
  2436. Function:    ABS(expr)
  2437.  
  2438. Returns:
  2439.     The absolute value of a numeric expression
  2440.  
  2441. Example:
  2442.     ABS(-3) -- returns 3
  2443.  
  2444.                 116
  2445.  
  2446. Function:    CHAR.TO.NUM(expr)
  2447.  
  2448. Returns:
  2449.     The numeric value of the first character of the expression.
  2450.  
  2451. Example:
  2452.     CHAR.TO.NUM("A") returns 65
  2453.  
  2454.                 117
  2455.  
  2456. Function:    LEFT(expr,numchars)
  2457.  
  2458. Returns:
  2459.     The left-most <numchars> characters of the expression.
  2460.  
  2461. Example:
  2462.     LEFT("ABCDEFGHIJLKMN",5)
  2463.     -- returns "ABCDE"
  2464.  
  2465.                 118
  2466.  
  2467. Function:    LENGTH(expr)
  2468.  
  2469. Returns:
  2470.     The length of the string value of the expression.
  2471.  
  2472. Example:
  2473.     LENGTH("ABCDEFGHI") returns 9
  2474.  
  2475.                 119
  2476.  
  2477. Function:    NUM.TO.CHAR(expr)
  2478.  
  2479. Returns:
  2480.     The string value, a single character string, of the ascii
  2481. equivalent of the expression.
  2482.  
  2483. Example:
  2484.     NUM.TO.CHAR(66) returns "B"
  2485.  
  2486.                 120
  2487.  
  2488. Function:    PARM(expr)
  2489.  
  2490. Returns:
  2491.     The value of a parameter to a user written function.  If you use a
  2492. name, followed by expressions in parenthesis, UltraTalk thinks you are
  2493. calling a "function".  It evaluates the arguments and then sends a symbolic
  2494. message using the name of the function.  When you write the handler you use
  2495. the PARM function to retrieve the arguments from the caller's parameter
  2496. list.
  2497.  
  2498. Example:
  2499.     MY_FUNC:
  2500.        say "The first parameter is " !
  2501.         && PARM(1)
  2502.        say "The second parameter is " !
  2503.         && PARM(2)
  2504.        Put Parm(1) after Parm(2)
  2505.  
  2506.                 121
  2507.  
  2508.        Return Parm(2)
  2509.     END_MYFUNC
  2510.  
  2511.     Select:
  2512.         PUT "ABCD" into var1
  2513.         PUT "EFGH" into var2
  2514.         say MY_FUNC(var1,var2)
  2515.         -- will say "ABCDEFGH"
  2516.     END_SELECT
  2517.  
  2518.                 122
  2519.  
  2520. Function:    PARM.COUNT
  2521.  
  2522. Result:
  2523.     The number of parameters that have been passed to a user written
  2524. function.  There is a maximum number of 10 parameters.  This function will
  2525. return the number of parameters actually passed.  It is useful to check to
  2526. see if the number of parameters is correct.
  2527.  
  2528. Example:
  2529.     MY_FUNC:
  2530.  
  2531.     -- check to make sure argument list was
  2532.     -- right, i.e. user passed to parms
  2533.  
  2534.     IF Parm.Count <> 2
  2535.         Return "ERROR"
  2536.  
  2537.                 123
  2538.  
  2539.     ENDIF
  2540.  
  2541.       say "The first parameter is " !
  2542.         && PARM(1)
  2543.       say "The second parameter is " !
  2544.         && PARM(2)
  2545.       Put Parm(1) after Parm(2)
  2546.       Return Parm(2)
  2547.     END_MYFUNC
  2548.  
  2549.                 124
  2550.  
  2551. Function:    RIGHT(expr,num)
  2552.  
  2553. Returns:
  2554.     The rightmost <num> characters of the string expression.
  2555.  
  2556. Example:
  2557.     RIGHT ("ABCDEF",3) returns "DEF"
  2558.  
  2559.                 125
  2560.  
  2561. Function:    DATE
  2562.  
  2563. Returns:
  2564.     The date, as a string.
  2565.  
  2566. Example:
  2567.     PUT DATE into todays.date
  2568.  
  2569.                 126
  2570.  
  2571. Function:    DAY
  2572.  
  2573. Returns:
  2574.     The day of the week, as a 3 character abbrev.
  2575.  
  2576. Example:
  2577.     DAY returns "SUN"
  2578.  
  2579.                 127
  2580.  
  2581. Function:    DAY.OF.THE.WEEK
  2582.  
  2583. Returns:
  2584.     A number corresponding to the day of the week where 1 = SUNDAY, 2 =
  2585. MONDAY and so on until 7 = SATURDAY
  2586.  
  2587. Example:
  2588.     DAY.OF.THE.WEEK returns 1 on the Sunday
  2589.  
  2590.                 128
  2591.  
  2592. Function:    MONTH
  2593.  
  2594. Returns:    
  2595.     A string containing the 3 character abbrev. for the current month.
  2596.  
  2597. Example:
  2598.     MONTH returns "Jan" during June
  2599.  
  2600.                 129
  2601.  
  2602. Function:    YEAR
  2603.  
  2604. Returns:
  2605.     A string containing the last two digits of the current year.
  2606.  
  2607. Example:
  2608.     YEAR returns "89" for the year 1989
  2609.  
  2610.                 130
  2611.  
  2612. Function:    TIME
  2613.  
  2614. Returns:
  2615.     A string containing the hours, minutes, seconds and AM/PM for the
  2616. current time.
  2617.  
  2618. Example:
  2619.     TIME returns "10:00:05 AM" for 5 seconds after 10:00 AM.
  2620.  
  2621.                 131
  2622.  
  2623. Function:    WORD(index,expr)
  2624.  
  2625. Returns:
  2626.     A string containing the "index-th" word in the expression.  Word
  2627. numbering begins at 1.
  2628.  
  2629. Example:
  2630.     WORD(2, "This is a test") -- returns "is"
  2631.  
  2632.                 132
  2633.  
  2634. Function:    LINE(index,expr)
  2635.  
  2636. Returns:
  2637.     A string representing the "index-th" line in the expression.  Most
  2638. useful for multi-line values.  Line numbering begins at 1.
  2639.  
  2640. Example:
  2641.  
  2642.     Assume we have a multi-line object containing:
  2643.  
  2644.     +------------------------+
  2645.     | UltraCard              |
  2646.     | Hypermedia Software    |
  2647.     | From                   |
  2648.     | Intuitive Technologies |
  2649.     +------------------------+
  2650.  
  2651. Line(2,field) would return:
  2652. "Hypermedia Software"
  2653.  
  2654.                 133
  2655.  
  2656. Function:    ITEM(index,expr)
  2657.  
  2658. Returns:
  2659.     The index-th "item" from the expression.  Items are separated by
  2660. commas.
  2661.  
  2662. Example:
  2663.     Item(3, "ABC,DEF,GHI,JKL")
  2664.     -- returns "GHI"
  2665.  
  2666.                 134
  2667.  
  2668. Function:    OBJECT(expr)
  2669.  
  2670. Returns:
  2671.     The name of the object whose id number is contained in expr. 
  2672. Useful with the GET statement to select objects other than by name.
  2673.  
  2674. Example:
  2675.     GET the Top.Line of Object(3)
  2676.  
  2677.                 135
  2678.  
  2679. Function:    STILLDOWN
  2680.  
  2681. Return:    
  2682.     TRUE if the mouse button is still down.  This is used in the
  2683. SELECT.DOWN handler to track the mouse.
  2684.  
  2685.                 136
  2686.  
  2687. Function:    VERSION
  2688.  
  2689. Returns:
  2690.     The version number of UltraCard as a string.  it is in the form:
  2691.  
  2692.     MMmmxxxx
  2693.  
  2694. where MM is the major version (like 01) and mm is the minor version (like
  2695. 30) and xxxx is reserved.
  2696.  
  2697. The VERSION function returns the word "VERSION" on releases prior to 1.2.1.
  2698. In version 1.3 it returns "01300000".
  2699.  
  2700.                 137
  2701.  
  2702. Function:    BDROP.ID
  2703.  
  2704. Returns:
  2705.     The id number of the current backdrop.  Using this function you can
  2706. write scripts that step through a stack and know when the backdrop changes
  2707. by monitoring the value of BDROP.ID.
  2708.  
  2709.                 138
  2710.  
  2711. Function:     AVAILABLE.MEMORY
  2712.  
  2713. Returns:
  2714.     The amount of TOTAL available memory.  It includes both CHIP and
  2715. FAST memory.
  2716.  
  2717.                 139
  2718.  
  2719. Function:    AVAILABLE.CHIP.MEMORY
  2720.  
  2721. This function returns the amount of CHIP memory available.  You could use
  2722. the value of this function to determine whether or not you need to use the
  2723. SLEEP statement when preparing to run another program:
  2724.  
  2725.     If Available.Chip.Memory < 128000
  2726.         SLEEP
  2727.     Endif
  2728.     WORKBENCH "dh0:planit"
  2729.     WakeUp
  2730.     -- doesn't hurt if you weren't sleeping!
  2731.  
  2732.                 140
  2733.  
  2734. Function:    NEXT.FRAME.OBJECT(parm)
  2735.  
  2736. This function allows you to step through the objects of a frame and examine
  2737. their contents and/or properties.  The first call the NEXT.FRAME.OBJECT
  2738. should be made with a parm of 0.  The function returns the OBJECT id of the
  2739. next object in the frame.  You can then use this id number with the
  2740. OBJECT() function to find information about the object.  The second through
  2741. last calls to NEXT.FRAME.OBJECT should pass the result of the previous
  2742. call.  NEXT.FRAME.OBJECT returns -1 when you have reached the end of the
  2743. list.
  2744.  
  2745. Example:
  2746.     Say the location of each object in the frame.
  2747.  
  2748. put 0 into id
  2749. LOOP
  2750.  
  2751.                 141
  2752.  
  2753.    put.next.frame.object(id) into id
  2754.  
  2755.    if id is -1
  2756.     -- check for last obj in frame
  2757.     break
  2758.    endif
  2759.  
  2760.    get top.edge of object(id) into top.pos
  2761.    get left.edge of object(id) into left.pos
  2762.    say "object " && id && " is at " && !
  2763.      left.pos && "  " && top.pos
  2764. ENDLOOP
  2765.  
  2766.                 142
  2767.  
  2768. Function:    NEXT.BACKDROP.OBJECT
  2769.  
  2770. This works identically to the NEXT.FRAME.OBJECT function described above
  2771. except that it steps through the objects in the current backdrop.
  2772.  
  2773.                 143
  2774.  
  2775.                    ULTRATALK GLOBAL VARIABLES
  2776.  
  2777.     Within the UltraCard program there are a number of predefined
  2778. global variables.  Some of these control aspects of the program's behavior
  2779. and some are set by the program for use by your scripts.
  2780.  
  2781.     This is a complete description of all the built-in globals and what
  2782. they mean.
  2783.  
  2784. LAST.DATE
  2785.  
  2786. set by the DATE function to the number of days since January 1, 1978.  It
  2787. is then subsequently used in all the calculations of Day.Of.The.Week, etc. 
  2788. It is a global variable so that you can calculate a different value and use
  2789. the built-in functions to extract information from that value (such as the
  2790. Month, Day.Of.The.Week, etc.)
  2791.  
  2792. CHAT
  2793.  
  2794. set by typing into the chat window.  If the chat window is on the screen
  2795. you can "put" an expression into the variable CHAT and it will appear in
  2796. the window immediately.
  2797.  
  2798. IT
  2799.  
  2800. the most default repository of information in UltraTalk.  Most statements
  2801. store information here if no other destination is given.
  2802.  
  2803.                 144
  2804.  
  2805. WIDTH.ADJUST
  2806.  
  2807. this is a numeric value which is used when performing graphic printing.  It
  2808. is defaulted to print 640 wide images as a full page wide and 320 wide
  2809. images as a 1/2 page wide.  Change it before you select either Print/Screen
  2810. or Print/Stack.
  2811.  
  2812. HEIGHT.ADJUST
  2813.  
  2814. this is a numeric value which is used when performing graphic printing.  It
  2815. is defaulted to print 200 high images as 1/3 page height and 400 high
  2816. images as 2/3 page height.  Change it before you select either Print/Screen
  2817. or Print/Stack.
  2818.  
  2819. CANT.MODIFY
  2820.  
  2821. this is a boolean value.  If it is non-zero then you are not allowed to
  2822. enter MODIFY mode via the menu item or the F2 function key.
  2823.  
  2824. CANT.ADD.FRAME
  2825.  
  2826. this is a boolean value.  If it is non-zero then you are not allowed to add
  2827. frames to the current stack either with or without new backdrop and you
  2828. also are prohibited from duplicating a frame.
  2829.  
  2830. CANT.DELETE.FRAME
  2831.  
  2832. this is a boolean value.  If it is non-zero then you are now allowed to
  2833. delete a frame.
  2834.  
  2835.                 145
  2836.  
  2837. SAVE.GLOBALS
  2838.  
  2839. this is a boolean value.  It defaults to FALSE.  If you set this to true in
  2840. a script then a copy of the global variables will be stored in the
  2841. currently open stack when it is closed either by opening another stack or
  2842. quitting the program.  Normally global variable changes are not permanently
  2843. recorded.
  2844.  
  2845. IN.MODIFY
  2846.  
  2847. this is a boolean value.  If it is non-zero then the program is currently
  2848. in MODIFY mode.  You can test this value in your scripts to determine, for
  2849. example, if your function key handler should perform a browse function or a
  2850. modify function.
  2851.  
  2852. FADE
  2853.  
  2854. this is a boolean value.  If it is non-zero then the screen fades to black
  2855. and back again on each JUMP.  This is particularly effective if the frame
  2856. to which you are jumping is in a different color palette.
  2857.  
  2858. DATA.CURSOR
  2859.  
  2860. this is a color value.  Normally the vertical line cursor used for
  2861. single-line data entry is shown as color 1.  By putting a different value
  2862. into DATA.CURSOR you can customize this.
  2863.  
  2864. TRUE
  2865.  
  2866.                 146
  2867.  
  2868. this is a constant.  Its value is "1"
  2869.  
  2870. FALSE
  2871.  
  2872. this is a constant.  Its value is "0"
  2873.  
  2874. MOUSE.X
  2875.  
  2876. this is the mouse horizontal position, in pixels, when the current message
  2877. was originally sent.
  2878.  
  2879. MOUSE.Y
  2880.  
  2881. this is the mouse vertical position, in pixels, when the current message
  2882. was originally sent.
  2883.  
  2884. SHIFT.KEY
  2885.  
  2886. this is a boolean.  If either shift key was down when the last system
  2887. message was received then this is TRUE.
  2888.  
  2889. ALT.KEY
  2890.  
  2891. this is a boolean.  If either alt key was down when the last system message
  2892. was received then this is TRUE.
  2893.  
  2894. CONTROL.KEY
  2895.  
  2896. this is a boolean.  If the control key was down when the last system
  2897. message was received then this is TRUE.
  2898.  
  2899.                 147
  2900.  
  2901. EXTERNAL.SCRIPTER
  2902.  
  2903. this is a program name.  It contains the name of the program to run when
  2904. the ARexx statement is executed.  By default this is "C:RUN C:RX" to run
  2905. ARexx scripts.
  2906.  
  2907. EDITOR
  2908.  
  2909. this is a program name.  It contains the name of the program to run when
  2910. the External Editor menu item is selected in the UltraTalk editor.
  2911.  
  2912. PAINT
  2913.  
  2914. this is a program name.  It contains the name of the program to run when
  2915. the IFF/Paint menu item is selected in MODIFY mode.  It is normally run
  2916. using a Workbench interface (because DPAINT requires it) but if the paint
  2917. program you are using can accept CLI type arguments then put and asterisk
  2918. (*) as the first character of this string and the program will be invoked
  2919. using a CLI interface instead of a Workbench one.
  2920.  
  2921.                 148
  2922.  
  2923. VISUAL.EFFECT
  2924.  
  2925. this is a number that represents which visual effect is to be used when a
  2926. JUMP WITH EFFECT is executed.
  2927.  
  2928.     The following are the allowed values of the global variable
  2929. VISUAL.EFFECT (and their meanings):
  2930.  
  2931.     0    -    Same as effect 1
  2932.     1    -    CUT - full screen single blit
  2933.     2    -    Wipe Down
  2934.     3    -    Wipe Up
  2935.     4    -    Wipe Left to Right
  2936.     5    -    Wipe Right to Left
  2937.     6    -    Curtain Open
  2938.     7    -    Curtain Close
  2939.     8    -    Slide on Left to Right
  2940.     9    -    Slide on Right to Left
  2941.        10    -    Slide Top to Bottom
  2942.        11    -    Slide Bottom to Top
  2943.        12    -    Zoom out from center
  2944.        13    -    Zoom in from outer edges
  2945.        14    -    Zoom out from point in EFFECT.X, EFFECT.Y
  2946.        15    -    Zoom in from point in EFFECT.X, EFFECT.Y
  2947.  
  2948.                 149
  2949.  
  2950. EFFECT.SPEED
  2951.  
  2952. this is a number ranging from 1 to 10 indicating how fast the visual effect
  2953. should be performed.  Since this interacts with EFFECT.AMOUNT (see below)
  2954. you can vary the apparent speed by using slower speeds and larger amounts
  2955. or by using faster speeds and smaller amounts.
  2956.  
  2957. EFFECT.AMOUNT
  2958.  
  2959. this is a number that varies depending upon the visual effect involved.  It
  2960. is the number of pixels that are transferred at one time from the new image
  2961. to the screen.  For example, if you are using effect 5 (wipe right to left)
  2962. an amount of 64 for a 640 wide screen will accomplish the effect in 640
  2963. steps.  This value is forced to be an even multiple of the screen size,
  2964. depending upon the effect.
  2965.  
  2966. EFFECT.X
  2967.  
  2968. this is a number used for effects 14 and 15 to indicate a point on the
  2969. screen where the zoom should focus.
  2970.  
  2971. EFFECT.Y
  2972.  
  2973. this is a number used for effects 14 and 15 to indicate a point on the
  2974. screen where the zoom should focus.
  2975.  
  2976.                 150
  2977.  
  2978. NEXT.FILE.NAME
  2979.  
  2980. this is a string.  It is NOT empty then the next time the file selector
  2981. would appear on the screen the value of this variable is returned instead. 
  2982. In this way you can, in combination with DO.MENU, operate the menus that
  2983. ask for filenames under script control.  After each file select which
  2984. accesses NEXT.FILE.NAME this variable is set to the empty string.
  2985.  
  2986. MULTI.MOUSE.MOVE
  2987.  
  2988. this is a boolean.  If it is still non-zero then while in a loop monitoring
  2989. the STILL.DOWN function mouse movements are compressed.  This gives faster
  2990. response.  Compression means that all mouse movement messages that are
  2991. queued by Intuition between calls to the STILL.DOWN function are reduced to
  2992. a single movement calculation.
  2993.  
  2994. DOWN.SOUND
  2995.  
  2996. this is a file name string.  If it is non-empty then this file is assumed
  2997. to contain a digitized sound and it is played when any button is clicked. 
  2998. Normally you would copy the sound file to a ram based disk (such as RAM: or
  2999. RAD:) and put that name into DOWN.SOUND
  3000.  
  3001.                 151
  3002.  
  3003. UP.SOUND
  3004.  
  3005. this is a file string.  If it is non-empty then this file is assumed to
  3006. contain a digitized sound and it is played when any button is released. 
  3007. Normally you would copy the sound file to a ram based disk (such as RAM: or
  3008. RAD:) and put that name into UP.SOUND.
  3009.  
  3010. GRID.AMOUNT
  3011.  
  3012. this is a number.  While in MODIFY mode positioning of objects is limited
  3013. to specific boundaries based upon the value of GRID.AMOUNT.  If this
  3014. variable contains, for example, 4 then objects can only be moved to pixel
  3015. locations evenly divisible by 4. This can be quite handy when creating
  3016. tables, etc.  Normally you simply use the chat window to execute the
  3017. statement:
  3018.  
  3019.     put 4 into grid.amount
  3020.  
  3021. or whatever value you want for grid resolution.
  3022.  
  3023. ME
  3024.  
  3025. this is a number.  It contains the ID of the object in which the current
  3026. script is executing.  You can use this as an argument to the OBJECT()
  3027. function.  You should use ME as opposed to direct object id's or names when
  3028. coding scripts that refer to the object itself so that your scripts can be
  3029. copied and put into new objects you create and no changes will be required.
  3030.  
  3031.                 152
  3032.  
  3033. TARGET
  3034.  
  3035. this is a number.  It contains the ID of the object which first processed
  3036. the message. It can be useful when used in conjunction with PASS.
  3037.  
  3038. THE.KEY
  3039.  
  3040. this is an ASCII character as a 1 character string.  it is used in
  3041. conjunction with the KEY.PRESS message and contains the most recent key
  3042. that was pressed.
  3043.  
  3044. RAW.KEY
  3045.  
  3046. this is a number.  It contains the raw key code for the most recent key
  3047. that was pressed.  It is used in conjunction with the KEY.PRESS message.
  3048.  
  3049. TAB.KEY.OBJECT
  3050.  
  3051. this is the ID of the object in which the TAB or RETURN key was most
  3052. recently pressed.  By using this you can determine, as is done in the STACK
  3053. script of the UltraDex stack, which object to activate next.
  3054.  
  3055. SELECTION
  3056.  
  3057. this is the ID of the selected object when in MODIFY mode.  By using this
  3058. and the OBJECT() function you can make property changes to the currently
  3059. selected object.
  3060.  
  3061.                 153
  3062.  
  3063. FIND.OBJECT
  3064.  
  3065. this is the ID of the object in which the string was found during the FIND
  3066. statement.
  3067.  
  3068. IO.LENGTH
  3069.  
  3070. this is a number indicating how many characters were read during the last
  3071. READ.FILE statement.  It is 0 for a blank line and -1 for end-of-file.
  3072.  
  3073. PATHWAYS
  3074.  
  3075. this is a multi-line text value containing the names of directories to
  3076. search when a JUMP statement specifies a stack name that is not fully
  3077. qualified (e.g. JUMP HELP).  It defaults to:
  3078.  
  3079.     ULTRA:
  3080.     ULTRA:STACKS
  3081.     ULTRA2:STACKS
  3082.  
  3083. SERIAL.PREFIX
  3084.  
  3085. this is a string that, if not empty, is sent before the user specified
  3086. characters during a SERIAL.WRITE statement.
  3087.  
  3088. SERIAL.SUFFIX
  3089.  
  3090. this is a string that, if not empty, is sent after the user specified
  3091. characters during a SERIAL.WRITE statement.
  3092.  
  3093.                 154
  3094.  
  3095. SERIAL.ERROR
  3096.  
  3097. this is a string that contains either 0 or "TIMEOUT" and is referenced
  3098. after a SERIAL.READ statement.
  3099.  
  3100. The following are constants you can use to make your scripts more readable:
  3101.  
  3102. ONE
  3103. TWO
  3104. THREE
  3105. FOUR
  3106. FIVE
  3107. SIX
  3108. SEVEN
  3109. EIGHT
  3110. NINE
  3111. TEN
  3112.  
  3113.                 155
  3114.  
  3115.                      UltraCard Object Properties
  3116.  
  3117.     Listed below are the properties of an UltraCard object that can be
  3118. retrieved and stored using the GET and SET UltraCard statements.
  3119.  
  3120. HiliteMode
  3121.     0 - None
  3122.     1 - Invert
  3123.     2 - Outline
  3124.  
  3125. NameDisplay
  3126.     0 - ShowLeft
  3127.     1 - ShowTop    
  3128.     2 - ShowRight
  3129.     3 - ShowBottom    
  3130.     4 - ShowInside
  3131.     5 - Hidden
  3132.  
  3133. Name
  3134.     Character String
  3135.  
  3136. NameFont
  3137.     Character String, font name followed by size, e.g.
  3138. TOPAZ 8 or RUBY 15
  3139.  
  3140. NameColor
  3141.     Number, 0 to max-1
  3142.  
  3143.                 156
  3144.  
  3145. NameStyle
  3146.     Bit encoded, OR together for multiple styles
  3147.  
  3148.     0 - Normal
  3149.     1 - Bold
  3150.     2 - Italic
  3151.     4 - Underline
  3152.  
  3153. Render
  3154.     0 - Clear
  3155.     1 - Solid
  3156.  
  3157. FillColor
  3158.     0 through 63 means solid color fill
  3159.  
  3160.     (Note: The following three values may be retrieved but DO NOT set
  3161.     them because there are other data items which must accompany them,
  3162.     like a bitmap, which unless the property is set by the program via
  3163.     the menu, it will NOT work!)
  3164.  
  3165.     43690 - Object is GRAPHIC fill
  3166.     56797 - Object is Horizontal Slider fill
  3167.     61166 - Object is Vertical Slider fill
  3168.  
  3169.                 157
  3170.  
  3171. OutlineStyle
  3172.     0 - None
  3173.     1 - Single
  3174.     2 - Double
  3175.     3 - Triple
  3176.  
  3177. OutlineColor
  3178.     0 to 63
  3179.  
  3180. Shape
  3181.     0 - Circle/Ellipse
  3182.     1 - Box
  3183.     2 - Horizontal Line
  3184.     3 - Vertical Line
  3185.     4 - Diagonal Line 1
  3186.     5 - Diagonal Line 2
  3187.  
  3188. DropShadow
  3189.     0 - None
  3190.     1 - Light
  3191.     2 - Medium
  3192.     3 - Heavy
  3193.  
  3194. ShadowColor
  3195.     0 to 63
  3196.  
  3197. Visible
  3198.     0 - Hidden
  3199.     1 - Visible
  3200.  
  3201.                 158
  3202.  
  3203. ScrollBar
  3204.     0 - Hidden
  3205.     1 - Visible
  3206.  
  3207. ScrollBarColor
  3208.     0 to 63
  3209.  
  3210. ScrollBarOrientation
  3211.     0 - Horizontal
  3212.     1 - Vertical
  3213.  
  3214. Hypertext
  3215.     A string value
  3216.  
  3217. NameShadow
  3218.     0 - No
  3219.     1 - Yes
  3220.  
  3221. NameShadowColor
  3222.     0 to 63
  3223.  
  3224. ValueColor
  3225.     0 to 63
  3226.  
  3227. ValueVisible
  3228.     0 - No
  3229.     1 - Yes
  3230.  
  3231. ValueLock
  3232.     0 - Editable
  3233.     1 - Locked
  3234.  
  3235.                 159
  3236.  
  3237. ValueShadow
  3238.     0 - No
  3239.     1 - Yes
  3240.  
  3241. ValueShadowColor
  3242.     0 to 63
  3243.  
  3244. ValueStyle
  3245.     Bit encoded, OR together for multiple styles.
  3246.  
  3247.     0 - Normal
  3248.     1 - Bold
  3249.     2 - Italic
  3250.     4 - Underline
  3251.  
  3252. MultiLine
  3253.     0 - Single Line
  3254.     1 - Multiple Line Value Display
  3255.  
  3256. TopLine
  3257.     Numeric value, beginning with 0, indicating which line of a
  3258. multi-line value is displayed at the top of the value display area.
  3259.  
  3260. LeftEdge
  3261.     Numeric value, screen position
  3262.  
  3263. TopEdge
  3264.     Numeric value, screen position
  3265.  
  3266. Width
  3267.     Numeric value, screen position
  3268.  
  3269.                 160
  3270.  
  3271. Height
  3272.     Numeric value, screen position
  3273.  
  3274. ValueLineCount
  3275.     Numeric value, number of lines in a multi-line value (after word
  3276. wrap) or the maximum value for a slider fill.
  3277.  
  3278. Script
  3279.     Character string of the object's script.  If you set an object
  3280. script using this the next script will not take effect immediately.
  3281.         
  3282.                 161
  3283.  
  3284.                         UltraCard Messages
  3285.  
  3286.     This section lists all of the messages that are generated by
  3287. UltraCard and what they mean.
  3288.  
  3289. Entry/Exit Messages
  3290.  
  3291.     These messages are generated whenever an environment is entered or
  3292. exited.  There are empty handlers already supplied for you at each of these
  3293. levels.  If you need to do anything, such as declare global variables or
  3294. initialize objects, etc. you should put that code in the entry and exit
  3295. handlers for the appropriate level.
  3296.  
  3297. Stack.Entry    - when stack is opened
  3298. Stack.Exit    - at very end when stack is closed
  3299. BackDrop.Entry  - when backdrop is opened
  3300. BackDrop.Exit    - when backdrop is closed
  3301. Frame.Entry    - when frame is opened
  3302. Frame.Exit    - when frame is closed
  3303.  
  3304. Object Messages
  3305.  
  3306.     The following messages are generated by a mouse click inside an
  3307. object.  If you do not supply ARROW1 and ARROW2 handlers the built-in
  3308. handlers (that scroll at machine code speed) are used.
  3309.  
  3310. SELECT.DOWN    - when mouse is clicked in object
  3311. SELECT.UP    - when mouse is released in object
  3312.  ARROW1        - when up/left arrow is clicked
  3313.  ARROW2        - when down/right arrow is clicked
  3314.  
  3315.                 162
  3316.  
  3317. Mouse Messages
  3318.  
  3319.     The following messages are generated by a mouse click outside an
  3320. object.
  3321.  
  3322. CLICK.DOWN    - when mouse is clicked down but not in an object
  3323. CLICK.UP    - when mouse is released but not in an object
  3324.  
  3325. Timer Messages
  3326.  
  3327.     These messages are sent as the UltraCard program timer expires and
  3328. counts the various time amounts.  If there are no handlers for these
  3329. messages they are ignored.
  3330.  
  3331. QUARTER.SECOND.TICK    - every 1/4 second
  3332. SECOND.TICK        - every 1 second
  3333. MINUTE.TICK        - every 60 seconds
  3334. HOUR.TICK        - every 3600 seconds
  3335. DAY.TICK        - every 24 hours
  3336.  
  3337. Intercept Messages
  3338.  
  3339.     The following messages are sent when a menu item is selected that
  3340. means the user wants to run a specialized external program, paint or edit. 
  3341. The data that the program is to operate on is already prepared.  There are
  3342. default handlers built-in to the program that
  3343.  
  3344.                 163
  3345.  
  3346. start the programs configured by the preferences frame in the ControlRoom
  3347. stack.  However, as in the case of DigiPaint, some paint programs cannot
  3348. import/export non-HAM images.  So by coding a handler for these messages
  3349. you can preprocess or postprocess the data sent to and from the external
  3350. program.
  3351.  
  3352. RUN.EDIT    - when the External Editor menu item is chosen in the
  3353.           UltraTalk editor.  The data is already written to the
  3354.           file:  "T:ULTRA.EDIT".
  3355.  
  3356. RUN.PAINT    - the IFF/Paint menu item is chosen in MODIFY mode.  The
  3357.           backdrop is already written to the file: "T:ULTRAPIC".
  3358.  
  3359. Misc.
  3360.  
  3361. PRINT.REPORT    - this is always generated by the user choosing the 
  3362.           Print/Report menu item because that is all the menu item
  3363.           does.  You should code a handler for this message at the
  3364.           stack script level to do a custom report.
  3365.  
  3366. Keyboard Messages
  3367.  
  3368. KEY.PRESS    - when any key is pressed that is not a special key.
  3369.            Special keys generate their own messages (see below).
  3370.           The ASCII character is in the global variable THE.KEY
  3371.           and the raw key code value is in RAW.KEY, as a number.
  3372.  
  3373. ESCAPE
  3374.  
  3375. UP.ARROW    )
  3376. DOWN.ARROW    ) KEYBOARD ARROW KEYS
  3377. RIGHT.ARROW    )
  3378. LEFT.ARROW    )
  3379.  
  3380. KEY.F1
  3381. KEY.F2
  3382. KEY.F3
  3383. KEY.F4
  3384. KEY.F5
  3385. KEY.F6
  3386. KEY.F7
  3387. KEY.F8
  3388. KEY.F9
  3389. KEY.F10
  3390. KEY.HELP
  3391.  
  3392. TAB.KEY        - only generated when data entry is operating, otherwise
  3393.           the tab key generates a regular KEY.PRESS message.
  3394.  
  3395. RETURN.KEY    - like tab key, only generated when RETURN key is pressed
  3396.           during data entry.
  3397.  
  3398.                 165
  3399.  
  3400.                         Creating A New Stack
  3401.  
  3402.     To create your own stacks you should take the following steps:
  3403.  
  3404. 1.  Select New Stack from the Project menu.
  3405.  
  3406. 2.  Select the resolution and number of colors from the requester that
  3407.     appears.
  3408.  
  3409. 3.  Wait for the requester that tells you that your stack is ready to go.
  3410.  
  3411. 4.  Click OK.
  3412.  
  3413. 5.  To begin adding objects and pictures to your stack you must enter 
  3414.     Modify mode.  Pick Modify... from the Edit menu or press F2.
  3415.  
  3416. 6.  The most often thing that is done first is to import an IFF picture as
  3417.     a backdrop.  If you choose a picture that is the wrong resolution or
  3418.     depth, UltraCard will beep and then tell you what resolution you must
  3419.     use to import the picture.
  3420.  
  3421. 7.  To create object, pick from the New item under the Edit menu.  Note
  3422.     that they have keyboard shortcuts based upon the Esc key.
  3423.  
  3424. 8.  To add additional frames using the same backdrop picture and fields you
  3425.     must return to Browse mode (Press F1) and select Add
  3426.  
  3427.                 166
  3428.  
  3429.    from the Frame item under the Edit menu.
  3430.  
  3431. 9.  To add additional frames with a new backdrop picture and fields you
  3432.     must return to Browse mode and select Add New BD from the Frame item
  3433.     under the Edit menu.
  3434.  
  3435. 10. Use the items under the Info menu to help you keep track of your
  3436.     backdrops and frames.
  3437.  
  3438.                 167
  3439.  
  3440.                       UltraCard Menu Reference
  3441.  
  3442.                          Browse Mode Menus
  3443.  
  3444. PROJECT
  3445.  
  3446.     NEW STACK
  3447.         Allows you to create a new stack.  You will be prompted
  3448.         for a name.  A requester will pop up asking for resolution
  3449.         and colors.
  3450.     
  3451.     OPEN STACK
  3452.         Allows you to open an existing stack.  You will be prompted
  3453.         for a name using the UltraCard standard file selector.
  3454.  
  3455.     COMPACT STACK
  3456.         Your stack will have the "empty" space squeezed out of it.
  3457.         As you use stacks they "grow".  Your old stack will be
  3458.         renamed with ".OLD' at the end of its name and a new stack
  3459.         will be created that contains all your information but
  3460.         taking less space on the disk and operating faster.
  3461.  
  3462.     PROTECT STACK
  3463.         You will be prompted for a password.  From then on you must
  3464.         supply the password when you open the stack.
  3465.  
  3466.                 168
  3467.  
  3468.     OUTPUT TO
  3469.         Allows you to select whether print screen is to the 
  3470.         printer or to a file.
  3471.  
  3472.         FILE
  3473.  
  3474.         PRINTER
  3475.  
  3476.     PRINT
  3477.         Allows you to pick a single frame, a whole stack or to
  3478.         send a message to your scripts to print a report.  Refer
  3479.         to the GLOBAL variables section for the use of the 
  3480.         HEIGHT.ADJUST and WIDTH.ADJUST variables and how they
  3481.         affect printing SCREEN and STACK.  The Report sub-item
  3482.         simply sends the message PRINT.REPORT for which you must
  3483.         write a handler.
  3484.  
  3485.         SCREEN
  3486.         
  3487.         STACK
  3488.  
  3489.         REPORT
  3490.  
  3491.     OPEN WORKBENCH
  3492.         Allows you to open the workbench screen if you closed it
  3493.         to save memory.
  3494.  
  3495.                 169
  3496.  
  3497.     CLOSE WORKBENCH
  3498.         Allows you to close the workbench screen to save CHIP
  3499.         memory.  If you have ANY open windows other than workbench
  3500.         windows, such as a CLI window or a clock then the
  3501.         workbench will not close.
  3502.  
  3503.     ABOUT ULTRACARD
  3504.         Tells you the version number of your copy of UltraCard.
  3505.  
  3506.     ICONIFY
  3507.         Shrinks the program down to an icon on the workbench 
  3508.         screen and releases all the CHIP memory used for the
  3509.         screen.  Handy when you are using a paint program in a 
  3510.         512K Agnus machine.
  3511.  
  3512.     QUIT
  3513.         Leaves UltraCard.
  3514.  
  3515. EDIT
  3516.  
  3517.     FRAME
  3518.         Allows you to add, delete and duplicate frames.
  3519.  
  3520.         ADD
  3521.             Adds new frame using the current backdrop.
  3522.  
  3523.         ADD NEW BD
  3524.             Adds new frame and creates a new, empty (blank)
  3525.             backdrop.
  3526.  
  3527.                 170
  3528.  
  3529.         DELETE
  3530.             Deletes the currently visible frame.  Asks for
  3531.             confirmation.
  3532.  
  3533.         DUPLICATE
  3534.             Make a duplicate of the currently visible frame.
  3535.             After this menu selection you are positioned on the
  3536.             NEW frame.
  3537.  
  3538.     INFO
  3539.         Gives information about the item selected.
  3540.  
  3541.         STACK
  3542.  
  3543.         BACKDROP
  3544.  
  3545.         FRAME
  3546.  
  3547.     MODIFY...
  3548.         Allows you to enter modify mode.  You may also press F2.
  3549.  
  3550. GO
  3551.  
  3552.     HELP
  3553.         Pushes the location of the currently visible frame and
  3554.         jumps to the Help stack.
  3555.  
  3556.     BACK
  3557.         Navigates back to the last visible frame.  Could be in
  3558.         another stack.
  3559.  
  3560.                 171
  3561.  
  3562.     JUMP
  3563.         Allows navigation within the current stack.
  3564.  
  3565.         FIRST
  3566.  
  3567.         NEXT
  3568.  
  3569.         PREV
  3570.  
  3571.         LAST
  3572.  
  3573.     RECENT
  3574.         Shows the list of the previous 25 unique frames you have
  3575.         visited.  You may choose from the list for a direct jump.
  3576.  
  3577.     FIND
  3578.         Allows you to find a string in the value portion of any
  3579.         object.
  3580.  
  3581.     CHAT
  3582.         Opens the CHAT window that allows you to type a single
  3583.         UltraTalk command.
  3584.  
  3585.                 172
  3586.  
  3587.                          Modify Mode Menus
  3588.  
  3589. EDIT
  3590.  
  3591.     NEW OBJECT
  3592.         Allows you to create a new object in the layer specified.
  3593.  
  3594.         FRAME (shortcut Esc)
  3595.  
  3596.         BACKDROP (shortcut Shift/Esc)
  3597.  
  3598.     CUT
  3599.         Copies selected object to clipboard and removes object
  3600.         from screen.
  3601.  
  3602.     COPY        
  3603.         Copies selected object to clipboard.
  3604.  
  3605.     PASTE
  3606.         Copies clipboard to screen.
  3607.  
  3608.     CLEAR
  3609.         Removes selected object, no UNDO!
  3610.  
  3611.     UNDO
  3612.         Restores object location/size after a move or sizing
  3613.         operation.
  3614.  
  3615.                 173
  3616.  
  3617.     SCRIPT
  3618.         Allows you to edit the selected script.
  3619.  
  3620.         STACK
  3621.  
  3622.         BACKDROP
  3623.  
  3624.         FRAME
  3625.  
  3626.     IFF
  3627.         Allows you to import and export the screen from/to IFF
  3628.         files.  If you hold down the SHIFT key when selecting
  3629.         EXPORT or PAINT it will include the objects in the IFF
  3630.         file.  If you don't hold down the shift key only the
  3631.         backdrop picture will be included.
  3632.  
  3633.         IMPORT
  3634.  
  3635.         EXPORT
  3636.  
  3637.         PAINT
  3638.             Exports current backdrop to an IFF file and runs
  3639.             the program specified in the global variable
  3640.             "PAINT".  See the message section about RUN.PAINT.
  3641.  
  3642.     COPY FRAME
  3643.         Copies the current frame to a special "frame clipboard".
  3644.         Note: This does not copy the backdrop picture or the 
  3645.         backdrop objects!
  3646.  
  3647.                 174
  3648.  
  3649.     PASTE FRAME
  3650.         Copy the contents of the "frame clipboard" into the 
  3651.         current frame.  Replaces all frame objects.
  3652.  
  3653.     OBJECT IN
  3654.         Allows you to tell what layer the currently selected
  3655.         object resides in.
  3656.  
  3657.         BDROP
  3658.  
  3659.         FRAME
  3660.  
  3661.     SELECT BY NAME
  3662.         Allows you to select an object by name even if the object
  3663.         is not visible or is off screen.
  3664.  
  3665.         BDROP
  3666.     
  3667.         FRAME
  3668.  
  3669.     BROWSE
  3670.         Allows you to return to BROWSE mode.  You can also press
  3671.         F1.
  3672.  
  3673. PROPERTIES
  3674.  
  3675.     SCRIPT
  3676.         Allows you to edit the script of the selected object.
  3677.  
  3678.     INFO
  3679.         Shows information about the selected object, color, style,
  3680.         location, etc.
  3681.  
  3682.                 175
  3683.  
  3684.     HILITE
  3685.         Allows you to choose how the visible feedback is shown
  3686.         when the user clicks on your object.
  3687.  
  3688.         NONE
  3689.  
  3690.         INVERT
  3691.  
  3692.         OUTLINE
  3693.  
  3694.     NAME
  3695.         Allows you to alter how, where, and in what font/color
  3696.         the object name is shown.
  3697.  
  3698.         SHOW AT LEFT
  3699.  
  3700.         SHOW AT TOP
  3701.  
  3702.         SHOW AT BOTTOM
  3703.  
  3704.         SHOW INSIDE
  3705.  
  3706.         HIDE
  3707.  
  3708.         CHANGE...
  3709.  
  3710.         FONT
  3711.  
  3712.         COLOR
  3713.  
  3714.     NAME STYLE
  3715.         Allows you to make your name show in a type style.
  3716.  
  3717.         PLAIN
  3718.  
  3719.                 176
  3720.  
  3721.         BOLD
  3722.  
  3723.         ITALIC
  3724.  
  3725.         UNDERLINE
  3726.  
  3727.         DROP SHADOW
  3728.  
  3729.         SHADOW COLOR
  3730.  
  3731.     RENDER
  3732.         Allows you to have your objects transparent or solid.
  3733.  
  3734.         A transparent graphic object is graphically and LOGICALLY
  3735.         transparent wherever it contains pixels of color 0.  This
  3736.         means that you can create irregularly shaped objects and
  3737.         layer them.
  3738.  
  3739.         CLEAR
  3740.  
  3741.         SOLID
  3742.  
  3743.     FILL
  3744.         Objects can be filled with solid colors, graphic bits, 
  3745.         proportional sliders, or in UltraCard Plus an external fill
  3746.         such as an animation.
  3747.  
  3748.         COLOR
  3749.  
  3750.         GRAPHIC
  3751.             Choosing this not only selects the graphic fill
  3752.             property but also allows you to extract the 
  3753.             graphic image from an IFF picture.  When you have
  3754.  
  3755.                 177
  3756.  
  3757.             the picture and the cursor changes to the 
  3758.             cross-hairs click and drag a box around the area
  3759.             you wish to use as a graphic fill.  When you
  3760.             release the mouse button the picture will disappear
  3761.             and the stack backdrop will reappear with the
  3762.             object filled in as selected.
  3763.  
  3764.         HORIZ. SLIDER
  3765.  
  3766.         VERT. SLIDER
  3767.  
  3768.         EXTERNAL
  3769.  
  3770.         COLOR...
  3771.  
  3772.     DROP SHADOW
  3773.         Allows you to choose a drop shadow effect for your objects
  3774.         to give them the appearance of depth.
  3775.  
  3776.         NONE
  3777.  
  3778.         LIGHT
  3779.  
  3780.         MEDIUM
  3781.  
  3782.         HEAVY
  3783.  
  3784.         COLOR...
  3785.  
  3786.     OUTLINE
  3787.         Allows you to choose outline display for your objects to
  3788.         enhance their appearance.
  3789.  
  3790.         NONE
  3791.  
  3792.                 178
  3793.  
  3794.         SINGLE
  3795.  
  3796.         DOUBLE
  3797.  
  3798.         TRIPLE
  3799.  
  3800.         COLOR
  3801.  
  3802.     SHAPE
  3803.         Allows you to choose the shape of the fill for your object.
  3804.  
  3805.         CIRCLE/ELLIPSE
  3806.  
  3807.         BOX
  3808.  
  3809.         HORIZ. LINE
  3810.  
  3811.         VERT. LINE
  3812.  
  3813.         DIAG. LINE 1
  3814.         
  3815.         DIAG. LINE 2
  3816.  
  3817.     VISIBLE
  3818.         Objects can be visible or hidden and then made visible by
  3819.         script control.
  3820.  
  3821.         YES
  3822.  
  3823.         NO
  3824.  
  3825.     SET CUSTOM
  3826.         These menu items generate messages SET.CUSTOM1 through
  3827.         SET.CUSTOM4 for which you can write handlers in your stack
  3828.         script to set multiple property
  3829.  
  3830.                 179
  3831.  
  3832.         adjustments.  If you do not write special handlers they
  3833.         have no effect.
  3834.  
  3835.         1
  3836.         2
  3837.         3
  3838.         4
  3839.  
  3840.                 180
  3841.  
  3842. CONTENTS
  3843.  
  3844.     VALUE
  3845.         Every object can have a value.  This menu's items allow
  3846.         you to choose if that value is to be shown, is editable
  3847.         by the user and in what color it appears.
  3848.  
  3849.         HIDE
  3850.  
  3851.         SHOW
  3852.  
  3853.         EDIT
  3854.  
  3855.         LOCK
  3856.  
  3857.         COLOR
  3858.  
  3859.     VALUE STYLE
  3860.         Allows you to enhance the display of your objects value.
  3861.  
  3862.         PLAIN
  3863.  
  3864.         BOLD
  3865.  
  3866.         ITALIC
  3867.  
  3868.         UNDERLINE
  3869.  
  3870.         DROP SHADOW
  3871.  
  3872.         SHADOW COLOR
  3873.  
  3874.                 181
  3875.  
  3876.         MULTILINE
  3877.             If YES is chosen here then the value is 
  3878.             word-wrapped to fit and can be scrolled.
  3879.  
  3880.             YES
  3881.  
  3882.             NO
  3883.  
  3884.         HYPERTEXT...
  3885.             Allows you to manipulate the HYPERTEXT property of
  3886.             your object.  This is applicable only to multi-line
  3887.             objects.  See the MANUAL stack for more details.
  3888.  
  3889.         SCROLLER
  3890.             Allows you to enable or disable scrolling arrows
  3891.             for multi-line objects.
  3892.  
  3893.             HIDE
  3894.  
  3895.             SHOW
  3896.  
  3897.             HORIZONTAL
  3898.  
  3899.             VERTICAL
  3900.  
  3901.             COLOR...
  3902.  
  3903.                 182
  3904.  
  3905.                                Index
  3906.  
  3907. Arrow Key
  3908.     Down 20
  3909.     Up 20
  3910. BBS
  3911.     Phone Number 22
  3912. Browser
  3913.     Distribution of 23
  3914. Expressions
  3915.     Operators 35
  3916. Objects
  3917.     Building Blocks 17
  3918.     Types Of 17
  3919. Pathways
  3920.     Setting 14
  3921. Stacks
  3922.     ControlRoom 12
  3923.     Loading Others 14
  3924.     Manual 15
  3925. UltraCard
  3926.     Features 5
  3927.     What can it do? 2
  3928.     What is it? 1
  3929.     When to use 4
  3930. UltraTalk
  3931.     Data Values 25
  3932.     Expressions 35
  3933.     Function Handlers 34
  3934.     Functions 116
  3935.         ABS 116
  3936.         AVAILABLE.CHIP.MEMORY 139
  3937.         AVAILABLE.MEMORY 138
  3938.         BDROP.ID 137
  3939.  
  3940.                 183
  3941.  
  3942.         CHAR.TO.NUM 117
  3943.         DATE 125
  3944.         DAY 126
  3945.         DAY.OF.THE.WEEK 127
  3946.         ITEM 133
  3947.         LEFT 118
  3948.         LENGTH 119
  3949.         LINE 132
  3950.         MONTH 128
  3951.         NEXT.BACKDROP.OBJECT 142
  3952.         NEXT.FRAME.OBJECT 140
  3953.         NUM.TO.CHAR 120
  3954.         OBJECT 134
  3955.         PARM 121
  3956.         PARMCOUNT 123
  3957.         RIGHT 124
  3958.         STILLDOWN 135
  3959.         TIME 130
  3960.         VERSION 136
  3961.         WORD 131
  3962.         YEAR 129
  3963.     Global Variables 144
  3964.     Message Handlers 31
  3965.     Message Hierarchy 29
  3966.     Message Transformation 30
  3967.     Messages 29, 162
  3968.     Properties 156
  3969.     Statement Handlers 33
  3970.     Statements
  3971.         ADD 72
  3972.         ANSWER 94
  3973.         AREXX 96
  3974.         ASK.VALUE 95
  3975.         BREAK 114
  3976.         CHANGE 55
  3977.         CHOOSE 56
  3978.         CLEAR 90
  3979.         CLI 63
  3980.         CLOSE.FILE 104
  3981.  
  3982.                 184
  3983.  
  3984.         CONTINUE 115
  3985.         COPY 88
  3986.         CURSOR 107
  3987.         CUT 87
  3988.         CYCLE.COLOR 41
  3989.         DELAY 93
  3990.         DELETE.FILE 105
  3991.         DIVIDE 75
  3992.         DO.MENU 108
  3993.         ELSE 67
  3994.         ENDFOR 111
  3995.         ENDIF 67
  3996.         ENDLOOP 112
  3997.         ENTER.MODIFY 84
  3998.         EXIT.MODIFY 85
  3999.         FIND 99
  4000.         FOR 111
  4001.         GET 76
  4002.         GET.FILE.NAME 66
  4003.         GLOBAL 71
  4004.         GOTO 70
  4005.         GRAPHIC.FILL 45
  4006.         IF 67
  4007.         JUMP 39
  4008.         LOAD.SOUND 57
  4009.         LOCK.SCREEN 77
  4010.         LOOP 112
  4011.         MENUS 47
  4012.         MOVE 110
  4013.         MOVE.SCREEN 53
  4014.         MULTIPLY 74
  4015.         NEW.OBJECT 86
  4016.         OPEN.FILE 100
  4017.         PASS 79
  4018.         PASTE 89
  4019.         PLAY 61
  4020.         POP 80
  4021.         PUSH 81
  4022.         PUT 40
  4023.         READ.FILE 102
  4024.  
  4025.                 185
  4026.  
  4027.         RETURN 82
  4028.         SAVE.BRUSH 44
  4029.         SAY 38
  4030.         SCREEN 98
  4031.         SCREEN.TITLE 54
  4032.         SELECT.OBJECT 92
  4033.         SEND 83
  4034.         SERIAL.CLOSE 49
  4035.         SERIAL.FLUSH 52
  4036.         SERIAL.OPEN 48
  4037.         SERIAL.READ 50
  4038.         SERIAL.WRITE 51
  4039.         SET 68
  4040.         SET.COLOR 91
  4041.         SET.SCRIPT 46
  4042.         SHOW.MSG 109
  4043.         SLEEP 42
  4044.         SORT 106
  4045.         STOP.SOUND 60
  4046.         SUBTRACT 73
  4047.         UNLOAD.SOUND 58
  4048.         UNLOCK.SCREEN 78
  4049.         WAIT 65
  4050.         WAIT.SOUND 58
  4051.         WAKE.UP 43
  4052.         WHILE 113
  4053.         WORKBENCH 64
  4054.         WRITE.FILE 103
  4055.     Syntax 24
  4056.     Syntax Description 37
  4057.     Variables
  4058.         Global 32
  4059.         Local 32
  4060.  
  4061.                 186
  4062.  
  4063. ============================================================================
  4064.          DOCS PROVIDED BY  -+*+-THE SOUTHERN STAR-+*+- for M.A.A.D.                                                               
  4065. ============================================================================
  4066.